Example usage for java.util Collections emptyList

List of usage examples for java.util Collections emptyList

Introduction

In this page you can find the example usage for java.util Collections emptyList.

Prototype

@SuppressWarnings("unchecked")
public static final <T> List<T> emptyList() 

Source Link

Document

Returns an empty list (immutable).

Usage

From source file:com.janoz.usenet.processors.impl.NZBGetProcessor.java

@Override
public List<NameValuePair> getFilepostOtherProps(NZB nzb) {
    return Collections.emptyList();
}

From source file:io.wcm.caravan.pipeline.extensions.hal.action.StripHalTest.java

@Before
public void setup() {

    JsonPipelineOutput input = new JsonPipelineOutputImpl(payload, Collections.emptyList());
    JsonPipelineOutput output = action.execute(input, context).toBlocking().single();
    json = output.getPayload();/*from   ww  w. j  av  a2 s  .  c o m*/

}

From source file:com.intellij.plugins.haxe.model.FullyQualifiedInfo.java

public FullyQualifiedInfo(@Nullable String fullyQualifiedIdentifier) {
    this(new ArrayList<>(fullyQualifiedIdentifier != null
            ? Arrays.asList(StringUtils.split(fullyQualifiedIdentifier, PATH_SEPARATOR))
            : Collections.emptyList()));
}

From source file:org.labkey.nashorn.NashornModule.java

@NotNull
@Override
protected Collection<WebPartFactory> createWebPartFactories() {
    return Collections.emptyList();
}

From source file:io.pivotal.strepsirrhini.chaoslemur.reporter.DataDogReporterTest.java

@Test
public void badSendEvent() {
    this.mockServer.expect(requestTo(URI)).andExpect(method(HttpMethod.POST)).andRespond(withBadRequest());

    this.dataDog.sendEvent(new Event(UUID.randomUUID(), Collections.emptyList()));

    this.mockServer.verify();
}

From source file:org.openlmis.fulfillment.web.shipment.ShipmentDtoBuilder.java

/**
 * Create a new list of {@link ShipmentDto} based on data
 * from {@link Shipment}./*  ww w . j a v  a 2  s. co  m*/
 *
 * @param shipments collection used to create {@link ShipmentDto} list (can be {@code null})
 * @return new list of {@link ShipmentDto}. Empty list if passed argument is {@code null}.
 */
public List<ShipmentDto> build(Collection<Shipment> shipments) {
    if (null == shipments) {
        return Collections.emptyList();
    }
    return shipments.stream().map(this::export).collect(Collectors.toList());
}

From source file:eu.over9000.cathode.data.parameters.EmoteSets.java

@Override
public List<NameValuePair> buildParamPairs() {
    if (emoteSets.isEmpty()) {
        return Collections.emptyList();
    }/*from ww  w . j a v a  2 s .  c om*/
    return Collections.singletonList(new BasicNameValuePair("emotesets", String.join(",", emoteSets)));
}

From source file:net.sourceforge.subsonic.dao.RatingDao.java

/**
 * Returns paths for the highest rated albums.
 *
 * @param offset      Number of albums to skip.
 * @param count       Maximum number of albums to return.
 * @param musicFolders Only return albums in these folders.
 * @return Paths for the highest rated albums.
 *//*from w ww  . ja  v  a  2  s .  c  om*/
public List<String> getHighestRatedAlbums(final int offset, final int count,
        final List<MusicFolder> musicFolders) {
    if (count < 1 || musicFolders.isEmpty()) {
        return Collections.emptyList();
    }

    Map<String, Object> args = new HashMap<String, Object>() {
        {
            put("type", ALBUM.name());
            put("folders", MusicFolder.toPathList(musicFolders));
            put("count", count);
            put("offset", offset);
        }
    };

    String sql = "select user_rating.path from user_rating, media_file "
            + "where user_rating.path=media_file.path and media_file.present and media_file.type = :type and media_file.folder in (:folders) "
            + "group by path " + "order by avg(rating) desc limit :count offset :offset";
    return namedQueryForStrings(sql, args);
}

From source file:uk.co.flax.biosolr.ontology.core.ols.terms.RelatedTermsResult.java

/**
 * Get the terms held in the embedded ontology terms list.
 * @return a list of terms. Never <code>null</code>.
 *///from w w  w . ja  va2 s.  c  om
public List<OntologyTerm> getTerms() {
    return (embedded == null ? Collections.emptyList() : embedded.getTerms());
}

From source file:org.openlmis.fulfillment.service.referencedata.FacilityReferenceDataService.java

/**
 * Finds facilities by their ids./*from w w  w  . ja v a  2  s  .c om*/
 *
 * @param ids ids to look for.
 * @return a page of facilitiesg
 */
public Collection<FacilityDto> findByIds(Collection<UUID> ids) {
    if (CollectionUtils.isEmpty(ids)) {
        return Collections.emptyList();
    }
    return findAll("", RequestParameters.init().set("id", ids));
}