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.frank.search.solr.core.query.Node.java

/**
 * @return empty collection if {@link Node} does not have siblings.
 */
public Collection<Criteria> getSiblings() {
    return Collections.emptyList();
}

From source file:fr.ortolang.diffusion.api.event.EventFeedRepresentation.java

public EventFeedRepresentation() {
    events = Collections.emptyList();
}

From source file:com.mec.Security.JWTLoginFilter.java

@Override
public Authentication attemptAuthentication(HttpServletRequest req, HttpServletResponse res)
        throws AuthenticationException, IOException, ServletException {
    //System.out.println("JWTLoginFilter - attemptAuthentication");
    AccountCredentials creds = new ObjectMapper().readValue(req.getInputStream(), AccountCredentials.class);//no permite inner class
    return getAuthenticationManager().authenticate(new UsernamePasswordAuthenticationToken(creds.getUsername(),
            creds.getPassword(), Collections.emptyList()));
}

From source file:com.skelril.nitro.point.ValueMapping.java

public Collection<KeyType> getBestSatisifers(PointType value) {
    ListIterator<PointValue<KeyType, PointType>> satisfier = values.listIterator(values.size());
    while (satisfier.hasPrevious()) {
        PointValue<KeyType, PointType> curVal = satisfier.previous();
        PointType type = curVal.getPoints();
        if (type.compareTo(value) <= 0) {
            return curVal.getSatisfiers();
        }/*ww w  . j  av a 2s . c o m*/
    }
    return Collections.emptyList();
}

From source file:com.cloudera.oryx.rdf.computation.RDFDistributedGenerationRunner.java

@Override
protected List<DependsOn<Class<? extends JobStep>>> getPreDependencies() {
    return Collections.emptyList();
}

From source file:net.shopxx.service.impl.AttributeServiceImpl.java

@Transactional(readOnly = true)
@Cacheable(value = "attribute", condition = "#useCache")
public List<Attribute> findList(Long productCategoryId, Integer count, List<Filter> filters, List<Order> orders,
        boolean useCache) {
    ProductCategory productCategory = productCategoryDao.find(productCategoryId);
    if (productCategoryId != null && productCategory == null) {
        return Collections.emptyList();
    }//from   w w w.j a v  a2 s.co m
    return attributeDao.findList(productCategory, count, filters, orders);
}

From source file:com.khartec.waltz.data.application.AppTagDao.java

public List<Application> findByTag(String tag) {
    if (isEmpty(tag)) {
        return Collections.emptyList();
    }//  w  w w. j av  a 2s  . c o  m

    return dsl.select(APPLICATION.fields()).from(APPLICATION_TAG).innerJoin(APPLICATION)
            .on(APPLICATION_TAG.APPLICATION_ID.eq(APPLICATION.ID))
            .where(APPLICATION_TAG.TAG.equalIgnoreCase(tag)).orderBy(APPLICATION.NAME)
            .fetch(ApplicationDao.TO_DOMAIN_MAPPER);
}

From source file:org.gameontext.regsvc.db.RegistrationDocuments.java

/**
 * LIST//w w  w  .jav  a  2 s  . c om
 * @param owner Owner of sites (optional)
 * @param name Name of site/room (optional)
 * @return List of all sites, possibly filtered by owner and/or name. Will not return null.
 */
public List<JsonNode> listRegistrations(String eventId) {

    List<JsonNode> registrations = Collections.emptyList();

    registrations = db.queryView(all, JsonNode.class);

    if (registrations == null)
        return Collections.emptyList();

    return registrations;
}

From source file:com.pinterest.deployservice.common.AlarmDataFactory.java

/**
 * Take a JSON string and convert into a list of Alarm configs.
 *///  ww  w  .  j  a v  a  2  s.c  om
public List<AlarmBean> fromJson(String payload) {
    if (StringUtils.isEmpty(payload)) {
        return Collections.emptyList();
    }

    List<AlarmBean> configs = new ArrayList<>();
    JsonParser parser = new JsonParser();
    JsonObject jsonObj = (JsonObject) parser.parse(payload);
    JsonArray arrayOfUrls = jsonObj.getAsJsonArray(ALARM_ARRAY);
    for (int i = 0; i < arrayOfUrls.size(); i++) {
        JsonObject urlObj = arrayOfUrls.get(i).getAsJsonObject();
        AlarmBean config = new AlarmBean();
        config.setName(urlObj.get(NAME).getAsString());
        config.setAlarmUrl(urlObj.get(ALARM_URL).getAsString());
        JsonElement element = urlObj.get(METRICS_URL);
        if (!element.isJsonNull()) {
            config.setMetricsUrl(element.getAsString());
        }
        configs.add(config);
    }
    return configs;
}

From source file:com.linecorp.bot.model.message.template.ButtonsTemplate.java

@JsonCreator
public ButtonsTemplate(@JsonProperty("thumbnailImageUrl") String thumbnailImageUrl,
        @JsonProperty("title") String title, @JsonProperty("text") String text,
        @JsonProperty("actions") List<Action> actions) {
    this.thumbnailImageUrl = thumbnailImageUrl;
    this.title = title;
    this.text = text;
    this.actions = actions != null ? actions : Collections.emptyList();
}