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:io.bifroest.commons.net.jsonserver.commands.ReloadConfigurationCommand.java

@Override
public List<Pair<String, Boolean>> getParameters() {
    return Collections.emptyList();
}

From source file:cz.muni.fi.mir.db.dao.impl.ConfigurationDAOImpl.java

@Override
public List<Configuration> getAllCofigurations() {
    List<Configuration> resultList = Collections.emptyList();

    try {/*from  www  . ja  v a2s .c  o m*/
        resultList = entityManager.createQuery("SELECT c FROM configuration c", Configuration.class)
                .getResultList();
    } catch (NoResultException nre) {
        logger.debug(nre);
    }

    return resultList;
}

From source file:com.linecorp.bot.model.error.ErrorResponse.java

public ErrorResponse(@JsonProperty("message") final String message,
        @JsonProperty("details") final List<ErrorDetail> details) {
    this.message = message;
    this.details = details != null ? details : Collections.emptyList();
}

From source file:cz.muni.fi.mir.db.dao.impl.AnnotationValueDAOImpl.java

@Override
public List<AnnotationValue> getAll() {
    List<AnnotationValue> result = Collections.emptyList();
    try {/*from w w w.j av a 2s . com*/
        result = entityManager.createQuery("SELECT av FROM annotationValue av ORDER BY av.priority DESC",
                AnnotationValue.class).getResultList();
    } catch (NoResultException nre) {
        logger.debug(nre);
    }

    return result;
}

From source file:cd.go.authentication.ldap.utils.Util.java

public static List<String> listFromCommaSeparatedString(String str) {
    if (StringUtils.isBlank(str)) {
        return Collections.emptyList();
    }/*from w w w .  jav  a 2  s.com*/
    return Arrays.asList(str.split("\\s*,\\s*"));
}

From source file:cz.muni.fi.mir.db.dao.impl.ProgramDAOImpl.java

@Override
public List<Program> getProgramByNameAndVersion(String name, String version) {
    List<Program> resultList = Collections.emptyList();
    if (Tools.getInstance().stringIsEmpty(name) && Tools.getInstance().stringIsEmpty(version)) {
        return getAllPrograms();
    }/*from w w  w  .ja va  2s  .  co m*/

    try {
        resultList = entityManager
                .createQuery("SELECT p FROM program p WHERE p.name = :name AND p.version = :version",
                        Program.class)
                .setParameter("name", name).setParameter("version", version).getResultList();
    } catch (NoResultException nre) {
        logger.debug(nre);
    }

    return resultList;
}

From source file:com.subgraph.vega.internal.analysis.urls.HtmlUrlExtractor.java

List<URI> findHtmlUrls(IHttpResponse response) {
    final IHTMLParseResult htmlParseResult = response.getParsedHTML();

    if (htmlParseResult != null) {
        return extractUrlsFromDocument(htmlParseResult.getJsoupDocument());
    } else {/*from   ww  w.  j a v  a  2s .  c  om*/
        return Collections.emptyList();
    }
}

From source file:io.gravitee.management.idp.memory.authentication.spring.InMemoryAuthenticationProviderConfiguration.java

@Bean
public InMemoryUserDetailsManager userDetailsService() {
    return new InMemoryUserDetailsManager(Collections.emptyList());
}

From source file:com.dianping.avatar.cache.CacheKey.java

public List<Object> getParamsAsList() {
    if (params == null) {
        return Collections.emptyList();
    }/*from  w w w. ja  v  a 2  s. c  o m*/
    return Arrays.asList(params);
}

From source file:Main.java

/**
 * Returns the node in the passed node list as a list of nodes
 * @param nodeList The node list to render
 * @return a [possibly empty] list of nodes
 *//*from   ww w .  j  a  v a 2s . co  m*/
public static List<Node> nodeListToList(final NodeList nodeList) {
    if (nodeList == null)
        return Collections.emptyList();
    final int size = nodeList.getLength();
    if (size == 0)
        return Collections.emptyList();
    final List<Node> nodes = new ArrayList<Node>(size);
    for (int i = 0; i < size; i++) {
        nodes.add(nodeList.item(i));
    }
    return nodes;
}