Example usage for java.util Collections EMPTY_LIST

List of usage examples for java.util Collections EMPTY_LIST

Introduction

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

Prototype

List EMPTY_LIST

To view the source code for java.util Collections EMPTY_LIST.

Click Source Link

Document

The empty list (immutable).

Usage

From source file:edu.cornell.mannlib.vitro.webapp.edit.n3editing.processEdit.EditN3Generator.java

public List<String> generateN3(EditSubmission editSub, Model model) {
    return Collections.EMPTY_LIST;
}

From source file:org.beanfuse.security.service.GroupServiceImpl.java

public List get(Long[] groupIds) {
    if (null == groupIds || groupIds.length < 1)
        return Collections.EMPTY_LIST;
    else//from  w  ww. j  ava 2 s.c  o m
        return groupDao.get(groupIds);
}

From source file:de.hybris.platform.acceleratorservices.addonsupport.RequiredAddOnsNameProvider.java

protected List<String> getDependantAddOns(final String extensionName) {
    if (StringUtils.isEmpty(extensionName)) {
        return Collections.EMPTY_LIST;
    }//  www  . j a  v  a  2s  .  c o  m
    final ExtensionInfo extensionInfo = Utilities.getExtensionInfo(extensionName);
    final Set<ExtensionInfo> allRequiredExtensionInfos = extensionInfo.getAllRequiredExtensionInfos();

    // Check if each required extension is an addon
    final Set<String> allAddOns = new HashSet<String>();
    for (final ExtensionInfo extension : allRequiredExtensionInfos) {
        if (isAddOnExtension(extension)) {
            allAddOns.add(extension.getName());
        }
    }

    // Get the addon names in the correct order
    final List<String> addOnsInOrder = new ArrayList<String>();
    for (final String extName : Utilities.getExtensionNames()) {
        if (allAddOns.contains(extName)) {
            addOnsInOrder.add(extName);
        }
    }
    return addOnsInOrder;
}

From source file:com.cloudmine.api.rest.response.ListOfValuesResponse.java

public ListOfValuesResponse(HttpResponse response) {
    super(response, true, false);
    try {/*from  w w w .jav a 2s.  co  m*/
        values = JsonUtilities.jsonToClass(getMessageBody(), List.class);
    } catch (CloudMineException cme) {
        values = Collections.EMPTY_LIST;
    }
}

From source file:com.codecrate.shard.transfer.pcgen.PcgenDatasetImporter.java

public Collection getSupportedFileExtensions() {
    return Collections.EMPTY_LIST;
}

From source file:msi.gama.util.file.GamlFileInfo.java

public Collection<String> getImports() {
    return imports == null ? Collections.EMPTY_LIST : imports;
}

From source file:msi.gama.common.util.StringUtils.java

public static List<String> tokenize(final String expression) {
    if (expression == null) {
        return Collections.EMPTY_LIST;
    }/*from ww w.  j  a va2  s . c o  m*/
    final Pattern p = Pattern.compile(regex);
    final List<String> tokens = new ArrayList<String>();
    final Matcher m = p.matcher(expression);
    while (m.find()) {
        tokens.add(expression.substring(m.start(), m.end()));
    }
    return tokens;
}

From source file:architecture.ee.web.util.ParamUtils.java

public static <T> T getJsonParameter(HttpServletRequest request, String name, Class<T> requiredType) {
    try {/*  ww w . j  a  v  a  2s  . co m*/
        String jsonString = getParameter(request, name);
        com.fasterxml.jackson.databind.ObjectMapper mapper = new com.fasterxml.jackson.databind.ObjectMapper();
        return (T) mapper.readValue(jsonString, requiredType);
    } catch (Exception e) {

        log.error(e);

        if (requiredType == List.class)
            return (T) Collections.EMPTY_LIST;
        else if (requiredType == Map.class) {
            return (T) Collections.EMPTY_MAP;
        }
        return null;
    }
}

From source file:org.openmastery.publisher.core.timeline.IdleTimeBandModel.java

@Override
@JsonIgnore
public List<TimeBandModel> getContainedBands() {
    return Collections.EMPTY_LIST;
}

From source file:com.codecrate.shard.transfer.FileExtensionObjectImporterResolver.java

public Collection importObjects(File file, ProgressMonitor progress) {
    ObjectImporter importer = (ObjectImporter) getImporterForFile(file);
    if (null == importer) {
        LOG.info("No importer found to support file " + file);
        return Collections.EMPTY_LIST;
    }/* www . j av a  2  s  .c  o  m*/

    return importer.importObjects(file, progress);
}