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.jactr.modules.pm.aural.audicon.map.OffsetFeatureMap.java
protected Collection<IIdentifier> equal(Double when) { Set<IIdentifier> identifiers = _offsetMap.get(when); if (identifiers == null) identifiers = Collections.EMPTY_SET; return identifiers; }
From source file:hr.fer.spocc.grammar.cfg.CfgGrammar.java
public Set<Symbol<T>> getBeginsWithSet(List<Symbol<T>> sequence) { if (sequence.isEmpty()) return Collections.EMPTY_SET; Set<Symbol<T>> ret = new HashSet<Symbol<T>>(); for (Symbol<T> symbol : sequence) { if (symbol.getSymbolType() == SymbolType.VARIABLE) ret.addAll(getBeginsWithSet((Variable<T>) symbol)); if (!isEmptySymbol(symbol)) { if (symbol.getSymbolType() == SymbolType.TERMINAL) ret.add(symbol);/* w ww . j a v a2 s .com*/ return ret; } } // TODO jel treba mozda EOF? return ret; }
From source file:netention.core.Core.java
public Map<String, Object> getObject(final Vertex v) { return getObject(v, Collections.EMPTY_SET); }
From source file:com.opensymphony.able.action.DefaultCrudActionBean.java
public Map<String, Object> getAllValues() { return new AbstractMap<String, Object>() { @Override/* w w w . j a v a 2s.co m*/ public Object get(Object propertyName) { return getAllValuesForProperty((String) propertyName); } @Override public Set<Entry<String, Object>> entrySet() { return Collections.EMPTY_SET; } }; }
From source file:org.apache.nifi.admin.service.action.SetUserAuthoritiesActionTest.java
/** * Test activating an unknown user account. User accounts are unknown then * there is no pending account for the user. * * @throws Exception ex/* w ww . j a v a 2 s . c om*/ */ @Test(expected = AccountNotFoundException.class) public void testUnknownUser() throws Exception { UpdateUserAction setUserAuthorities = new UpdateUserAction(USER_ID_1, Collections.EMPTY_SET); setUserAuthorities.execute(daoFactory, authorityProvider); }
From source file:org.kie.workbench.common.screens.projecteditor.backend.server.PomEditorServiceImplTest.java
@Test public void testSaveNonClashingGAVChangeToGAV() { final Set<ModuleRepositories.ModuleRepository> moduleRepositoriesMetadata = new HashSet<ModuleRepositories.ModuleRepository>(); final ModuleRepositories moduleRepositories = new ModuleRepositories(moduleRepositoriesMetadata); when(moduleRepositoriesService.load(moduleRepositoriesPath)).thenReturn(moduleRepositories); final ArgumentCaptor<MavenRepositoryMetadata> resolvedRepositoriesCaptor = ArgumentCaptor .forClass(MavenRepositoryMetadata.class); when(repositoryResolver.getRepositoriesResolvingArtifact(eq(pomXml), resolvedRepositoriesCaptor.capture())) .thenReturn(Collections.EMPTY_SET); when(pom.getGav()).thenReturn(new GAV("groupId", "artifactId", "0.0.2")); service.save(pomPath, pomXml, metaData, comment, DeploymentMode.VALIDATED); verify(moduleService, times(1)).resolveModule(pomPath); verify(moduleRepositoriesService, times(1)).load(moduleRepositoriesPath); verify(repositoryResolver, times(1)).getRepositoriesResolvingArtifact(eq(pomXml)); final List<MavenRepositoryMetadata> resolvedRepositories = resolvedRepositoriesCaptor.getAllValues(); assertNotNull(resolvedRepositories); assertEquals(0, resolvedRepositories.size()); verify(ioService, times(1)).startBatch(any(FileSystem.class)); verify(ioService, times(1)).write(any(org.uberfire.java.nio.file.Path.class), eq(pomXml), eq(attributes), any(CommentedOption.class)); verify(ioService, times(1)).endBatch(); }
From source file:pt.ist.maidSyncher.domain.activeCollab.ACTask.java
private Collection<String> processLabel(pt.ist.maidSyncher.api.activeCollab.ACTask acTask) { ACTaskLabel newTaskLabel = ACTaskLabel.findById(acTask.getLabelId()); ACTaskLabel oldTaskLabel = getLabel(); setLabel(newTaskLabel);/*from www . j a v a2 s . co m*/ return !ObjectUtils.equals(newTaskLabel, oldTaskLabel) ? Collections.singleton(getPropertyDescriptorNameAndCheckItExists(acTask, "labelId")) : Collections.EMPTY_SET; }
From source file:org.lockss.poller.v3.VersionCounts.java
/** * @param landslideMinimum The minimum number of votes which would * make a version "popular".//from w w w . j a v a 2 s .c o m * @param excludedVersions A collection of plain hash values to be * excluded from the result. * @return A Map of ParticipantUserData to plain hash values, * including only those with head versions which have at least the * minimum support. */ public List<ParticipantUserData> getSortedRepairCandidates(int landslideMinimum) { return getSortedRepairCandidates(landslideMinimum, Collections.EMPTY_SET); }
From source file:org.apache.nifi.admin.service.action.SetUserAuthoritiesActionTest.java
/** * Testing case then an AuthorityAccessException occurs while setting a * users authorities.//from w w w. j a va 2s . c o m * * @throws Exception ex */ @Test(expected = AdministrationException.class) public void testAuthorityAccessException() throws Exception { UpdateUserAction setUserAuthorities = new UpdateUserAction(USER_ID_2, Collections.EMPTY_SET); setUserAuthorities.execute(daoFactory, authorityProvider); }
From source file:org.jactr.modules.pm.aural.audicon.map.KindFeatureMap.java
protected Collection<IIdentifier> equals(String kind) { kind = kind.toLowerCase();/*from w w w . j a v a 2s .co m*/ Set<IIdentifier> identifiers = _kindMap.get(kind); if (identifiers == null) identifiers = Collections.EMPTY_SET; return identifiers; }