Java Code Examples for com.helger.commons.collection.CollectionHelper#newSet()
The following examples show how to use
com.helger.commons.collection.CollectionHelper#newSet() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractMultiMapTestCase.java From ph-commons with Apache License 2.0 | 4 votes |
@Nonnull protected final ICommonsSet <String> getValueSet1 () { return CollectionHelper.newSet (getValue1 ()); }
Example 2
Source File: DirectedGraph.java From ph-commons with Apache License 2.0 | 4 votes |
@Nonnull @ReturnsMutableCopy public ICommonsSet <IMutableDirectedGraphNode> getAllStartNodes () { return CollectionHelper.newSet (m_aNodes.values (), x -> !x.hasIncomingRelations ()); }
Example 3
Source File: DirectedGraph.java From ph-commons with Apache License 2.0 | 4 votes |
@Nonnull @ReturnsMutableCopy public ICommonsSet <IMutableDirectedGraphNode> getAllEndNodes () { return CollectionHelper.newSet (m_aNodes.values (), x -> !x.hasOutgoingRelations ()); }
Example 4
Source File: ICommonsMap.java From ph-commons with Apache License 2.0 | 3 votes |
/** * Create a copy of all values matching the passed filter. * * @param aFilter * The filter to be applied. May be <code>null</code>. * @return A new non-<code>null</code> set with all matching keys. * @see #keySet() * @see #copyOfKeySet() */ @Nonnull @ReturnsMutableCopy default ICommonsSet <KEYTYPE> copyOfKeySet (@Nullable final Predicate <? super KEYTYPE> aFilter) { if (aFilter == null) return copyOfKeySet (); return CollectionHelper.newSet (keySet (), aFilter); }