List of usage examples for java.util Collections EMPTY_SET
Set EMPTY_SET
To view the source code for java.util Collections EMPTY_SET.
Click Source Link
From source file:org.springsource.ide.eclipse.boot.maven.analyzer.graph.DirectedGraph.java
@SuppressWarnings({ "rawtypes", "unchecked" }) public Collection<Object> getSuccessors(Object node) { Collection nodes = (Collection) dgraph.get(node); if (nodes != null) { return nodes; }// ww w . jav a 2s .c o m return Collections.EMPTY_SET; }
From source file:org.hyperledger.fabric.sdk.NetworkConfig.java
/** * Names of Orderers found/* w ww . ja va 2 s . com*/ * * @return Collection of peer names found. */ public Collection<String> getOrdererNames() { if (orderers == null) { return Collections.EMPTY_SET; } else { return new HashSet<>(orderers.keySet()); } }
From source file:org.codehaus.mojo.mrm.impl.maven.MemoryArtifactStore.java
/** * {@inheritDoc}/* w w w.j a v a 2 s .com*/ */ public synchronized Set getVersions(String groupId, String artifactId) { Map artifactMap = (Map) contents.get(groupId); Map versionMap = (Map) (artifactMap == null ? null : artifactMap.get(artifactId)); return new TreeSet(versionMap == null ? Collections.EMPTY_SET : versionMap.keySet()); }
From source file:org.jahia.test.services.content.interceptor.HtmlFilteringInterceptorTest.java
@Test public void testFilteringDisabled() throws Exception { String source = "abc"; assertEquals("Filtering should nor be done as the tag set is empty", source, HtmlFilteringInterceptor.filterTags(source, Collections.EMPTY_SET, false)); }
From source file:org.apache.camel.impl.DefaultPackageScanClassResolver.java
@SuppressWarnings("unchecked") public Set<Class<?>> findAnnotated(Class<? extends Annotation> annotation, String... packageNames) { if (packageNames == null) { return Collections.EMPTY_SET; }/*w ww . j a va 2 s. c o m*/ if (log.isDebugEnabled()) { log.debug("Searching for annotations of " + annotation.getName() + " in packages: " + Arrays.asList(packageNames)); } PackageScanFilter test = getCompositeFilter(new AnnotatedWithPackageScanFilter(annotation, true)); Set<Class<?>> classes = new LinkedHashSet<Class<?>>(); for (String pkg : packageNames) { find(test, pkg, classes); } if (log.isDebugEnabled()) { log.debug("Found: " + classes); } return classes; }
From source file:com.codecrate.shard.hibernate.BasicHibernateObjectDaoSupport.java
protected Collection searchObjects(String query) { FullTextSession fullTextSession = Search.createFullTextSession(getSession()); try {//from ww w. j a va 2s . com final MultiFieldQueryParser parser = new MultiFieldQueryParser(getSearchableFieldNames(), getAnalyzer()); org.apache.lucene.search.Query luceneQuery = parser.parse(query); FullTextQuery hibernateQuery = fullTextSession.createFullTextQuery(luceneQuery, getManagedClass()); return hibernateQuery.list(); } catch (ParseException e) { LOG.error("Error parsing query: " + query, e); return Collections.EMPTY_SET; } }
From source file:com.espertech.esper.core.service.StatementResultServiceImpl.java
/** * Ctor.// w w w .j a v a 2 s . c o m * @param statementLifecycleSvc handles persistence for statements * @param metricReportingService for metrics reporting * @param threadingService for outbound threading */ public StatementResultServiceImpl(String statementName, StatementLifecycleSvc statementLifecycleSvc, MetricReportingServiceSPI metricReportingService, ThreadingService threadingService) { log.debug(".ctor"); this.statementName = statementName; this.statementLifecycleSvc = statementLifecycleSvc; this.metricReportingService = metricReportingService; if (metricReportingService != null) { this.statementOutputHooks = metricReportingService.getStatementOutputHooks(); } else { this.statementOutputHooks = Collections.EMPTY_SET; } this.threadingService = threadingService; }
From source file:org.apache.jcs.auxiliary.remote.ZombieRemoteCacheService.java
/** * Does nothing.// w ww . j a v a 2 s . co m * <p> * (non-Javadoc) * @see org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheService#getGroupKeys(java.lang.String, * java.lang.String) */ public Set getGroupKeys(String cacheName, String groupName) { return Collections.EMPTY_SET; }
From source file:org.jsecurity.cache.ehcache.EhCache.java
public Set keys() { try {//from w w w.jav a 2 s. c o m List keys = cache.getKeys(); if (keys != null && !keys.isEmpty()) { return Collections.unmodifiableSet(new LinkedHashSet(keys)); } else { return Collections.EMPTY_SET; } } catch (Throwable t) { throw new CacheException(t); } }
From source file:org.mskcc.cbio.importer.dao.internal.ImportDataRecordHibernateDAO.java
/** * Functon to retrieve all ImportDataRecord. * * @return Collection<ImportDataRecord> *//*from w ww . ja v a 2s . co m*/ @Override @Transactional(propagation = Propagation.REQUIRED) public Collection<ImportDataRecord> getImportDataRecords() { Session session = getSession(); Query query = session.getNamedQuery("org.mskcc.cbio.import.model.importDataRecordAll"); List<ImportDataRecord> toReturn = query.list(); return (toReturn.size() > 0) ? new ArrayList<ImportDataRecord>(toReturn) : Collections.EMPTY_SET; }