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:edu.indiana.lib.twinpeaks.util.StatusUtils.java
/** * Get an iterator into the system status map * @param sessionContext Active SessionContext * @return Status map Iterator// ww w . j ava 2 s . co m */ public static Iterator getStatusMapEntrySetIterator(SessionContext sessionContext) { HashMap statusMap = (HashMap) sessionContext.get("searchStatus"); Set entrySet = Collections.EMPTY_SET; if (statusMap != null) { entrySet = statusMap.entrySet(); } return entrySet.iterator(); }
From source file:com.exxonmobile.ace.hybris.core.actions.replenishment.CloneCartAction.java
@Override public void executeAction(final ReplenishmentProcessModel process) throws Exception { final CartToOrderCronJobModel cartToOrderCronJob = process.getCartToOrderCronJob(); final CartModel cronJobCart = cartToOrderCronJob.getCart(); getUserService().setCurrentUser(cronJobCart.getUser()); final CartModel clone = getCartService().clone(getTypeService().getComposedTypeForClass(CartModel.class), getTypeService().getComposedTypeForClass(CartEntryModel.class), cronJobCart, getGuidKeyGenerator().generate().toString()); clone.setPaymentAddress(cartToOrderCronJob.getPaymentAddress()); clone.setDeliveryAddress(cartToOrderCronJob.getDeliveryAddress()); clone.setPaymentInfo(cartToOrderCronJob.getPaymentInfo()); clone.setStatus(OrderStatus.CREATED); clone.setAllPromotionResults(Collections.EMPTY_SET); clone.setPaymentTransactions(Collections.EMPTY_LIST); clone.setPermissionResults(Collections.EMPTY_LIST); clone.setGuid(getGuidKeyGenerator().generate().toString()); this.modelService.save(clone); processParameterHelper.setProcessParameter(process, "cart", clone); }
From source file:com.phoenixst.plexus.examples.EmptyGraph.java
/** * Returns an empty <code>Collection</code>. *///from w ww . j ava 2 s .co m public Collection incidentEdges(Object node, Predicate traverserPredicate) { checkNode(node); return Collections.EMPTY_SET; }
From source file:org.apache.jackrabbit.core.util.EmptyLinkedMap.java
/** * Returns an unmodifiable empty set. * * @return an unmodifiable empty set. */ public Set entrySet() { return Collections.EMPTY_SET; }
From source file:MainClass.java
public Iterator getPrefixes(String namespaceURI) { if (namespaceURI == null) throw new IllegalArgumentException("namespaceURI cannot be null"); if (prefixesByURI.containsKey(namespaceURI)) { return ((Set) prefixesByURI.get(namespaceURI)).iterator(); } else {//from ww w .ja va 2s . c o m return Collections.EMPTY_SET.iterator(); } }
From source file:com.adobe.acs.commons.analysis.jcrchecksum.impl.options.RequestChecksumGeneratorOptions.java
private static Set<String> getPathsFromInputstream(InputStream is, String encoding) throws IOException { if (is == null) { return Collections.EMPTY_SET; }//from w w w .j av a 2s . c o m Set<String> paths = new HashSet<String>(); encoding = (encoding != null) ? encoding : Charset.defaultCharset().name(); try (BufferedReader br = new BufferedReader(new InputStreamReader(is, encoding))) { String path; while ((path = br.readLine()) != null) { paths.add(path); } } return paths; }
From source file:com.cyclopsgroup.waterview.navigator.impl.DefaultNavigatorHome.java
Collection getChildren(String path) {
Collection c = (Collection) parentPathIndex.get(path);
return c == null ? Collections.EMPTY_SET : c;
}
From source file:name.richardson.james.bukkit.utilities.command.matcher.PlayerMatcherTest.java
@Test public void matches_WhenNoMatchAvailable_ReturnEmptySet() { assertEquals(getMatcher().matches(""), Collections.EMPTY_SET); }
From source file:org.atemsource.atem.utility.transform.impl.builder.Constant.java
@Override public AttributeTransformation<A, B> create(EntityType<B> targetType) { GenericAttributeTransformation<A, B> instance = beanLocator .getInstance(GenericAttributeTransformation.class); Set<AttributePath> attributeAs = Collections.EMPTY_SET; instance.setAttributeAs(attributeAs); Set<AttributePath> attributeBs = new HashSet<AttributePath>(); final AttributePath targetPath = attributePathBuilderFactory.createAttributePath(targetAttribute, targetType);//from w w w . ja va 2 s. c o m attributeBs.add(targetPath); instance.setAttributeBs(attributeBs); instance.setTransformation(new JavaTransformation<A, B>() { @Override public void mergeAB(A a, B b, TransformationContext ctx) { targetPath.setValue(b, constantValue); } @Override public void mergeBA(B b, A a, TransformationContext ctx) { } }); return instance; }
From source file:name.richardson.james.bukkit.utilities.command.argument.suggester.PlayerMatcherTest.java
@Test public void matches_WhenNoMatchAvailable_ReturnEmptySet() { assertEquals(getSuggester().suggestValue(""), Collections.EMPTY_SET); }