List of usage examples for java.util Collections EMPTY_LIST
List EMPTY_LIST
To view the source code for java.util Collections EMPTY_LIST.
Click Source Link
From source file:com.mycompany.springboot.model.User.java
@Override public Collection<? extends GrantedAuthority> getAuthorities() { return Collections.EMPTY_LIST; }
From source file:com.fizzed.stork.launcher.FileUtil.java
static public List<File> findFiles(String fileString, boolean ignoreNonExistent) throws IOException { if (fileString.endsWith("*")) { // file string contains a glob... File f = new File(fileString); File parent = f.getParentFile(); if (parent == null) { parent = new File("."); }//from w w w. j a v a 2 s. com FileFilter fileFilter = new WildcardFileFilter(f.getName()); File[] files = parent.listFiles(fileFilter); return Arrays.asList(files); } else { File f = new File(fileString); if (!f.exists()) { if (ignoreNonExistent) { return Collections.EMPTY_LIST; } else { throw new IOException("File [" + fileString + "] does not exist"); } } else { if (f.isDirectory()) { return Arrays.asList(f.listFiles()); } else { return Arrays.asList(f); } } } }
From source file:com.pscnlab.member.daos.impls.RoleDaoImpl.java
@Override public List<Role> findListByRoleIds(Set<Integer> roleIdsSet) { if (CollectionUtils.isEmpty(roleIdsSet)) { return Collections.EMPTY_LIST; }/*from ww w. ja v a 2s .c o m*/ FilterMap filterMap = new FilterMap(); filterMap.in("uuidRole", roleIdsSet); return super.list(filterMap); }
From source file:com.wms.studio.api.dto.PageDto.java
@SuppressWarnings("unchecked") public static <T> PageDto<T> EMPTY_PAGE() { return new PageDto<T>(Collections.EMPTY_LIST, 0, 0); }
From source file:info.magnolia.cms.beans.config.Listener.java
/** * Reads listener config from the config repository and caches its content in to the hash table. *///from w w w . ja v a2 s . c om public static void load() { log.info("Config : loading Listener info"); //$NON-NLS-1$ Collection children = Collections.EMPTY_LIST; try { Content startPage = ContentRepository.getHierarchyManager(ContentRepository.CONFIG) .getContent(CONFIG_PAGE); Content configNode = startPage.getContent("IPConfig"); children = configNode.getChildren(ItemType.CONTENTNODE); //$NON-NLS-1$ } catch (RepositoryException re) { log.error("Config : Failed to load Listener info"); //$NON-NLS-1$ log.error(re.getMessage(), re); } Listener.cachedContent.clear(); Listener.cacheContent(children); log.info("Config : Listener info loaded"); //$NON-NLS-1$ }
From source file:com.wavemaker.tools.apidocs.tools.parser.util.TypeUtil.java
/** * It will scan for given {@link Type}.//from w ww. ja v a2 s . c o m * <p/> * For eg: Type is <code>List<String></code>. It will Returns: Actual Type: List Type Arguments: String * * @param type type to scan * @return {@link TypeInformation} of given type. */ public static TypeInformation extractTypeInformation(Type type) { Class<?> actualType; if (TypeUtils.isArrayType(type)) { // conditions order is important. return getArrayTypeInformation(type); } else if (type instanceof Class<?>) { actualType = (Class<?>) type; // enums take strings only. } else if (type instanceof ParameterizedType) { return getParameterizedTypeTypeInformation((ParameterizedType) type); } else { // cases like WildCard Type and TypeVariable actualType = Object.class; // sending null doesn't make sense } return new TypeInformation(actualType, Collections.EMPTY_LIST, false, type); }
From source file:edu.cornell.mannlib.vitro.webapp.dao.jena.EmptyReifier.java
@Override public ExtendedIterator<Node> allNodes(Triple arg0) { return WrappedIterator.create(Collections.EMPTY_LIST.iterator()); }
From source file:ar.com.zauber.commons.dao.Ordering.java
/** creates an empty ordering */ @SuppressWarnings("unchecked") public Ordering() { this(Collections.EMPTY_LIST); }
From source file:com.amalto.workbench.utils.MDMServerHelper.java
public static List<MDMServerDef> getServers() { ILegendServerDefService service = (ILegendServerDefService) GlobalServiceRegister.getDefault() .getService(ILegendServerDefService.class); if (service != null) { return service.getLegendServerDefs(); }/*w w w .j av a 2s . c o m*/ return Collections.EMPTY_LIST; }
From source file:net.shopxx.BaseAttributeConverter.java
public Object convertToEntityAttribute(String dbData) { if (StringUtils.isEmpty(dbData)) { if (List.class.isAssignableFrom(javaType.getRawClass())) { return Collections.EMPTY_LIST; } else if (Set.class.isAssignableFrom(javaType.getRawClass())) { return Collections.EMPTY_SET; } else if (Map.class.isAssignableFrom(javaType.getRawClass())) { return Collections.EMPTY_MAP; } else {//from ww w .ja v a 2 s .c om return null; } } return JsonUtils.toObject(dbData, javaType); }