Java Code Examples for com.helger.commons.collection.CollectionHelper#findAllMapped()
The following examples show how to use
com.helger.commons.collection.CollectionHelper#findAllMapped() .
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: DirectedGraphNode.java From ph-commons with Apache License 2.0 | 5 votes |
@Nonnull @ReturnsMutableCopy public ICommonsSet <IMutableDirectedGraphNode> getAllFromNodes () { final ICommonsSet <IMutableDirectedGraphNode> ret = new CommonsHashSet <> (); if (m_aIncoming != null) CollectionHelper.findAllMapped (m_aIncoming.values (), IMutableDirectedGraphRelation::getFrom, ret::add); return ret; }
Example 2
Source File: DirectedGraphNode.java From ph-commons with Apache License 2.0 | 5 votes |
@Nonnull @ReturnsMutableCopy public ICommonsSet <IMutableDirectedGraphNode> getAllToNodes () { final ICommonsSet <IMutableDirectedGraphNode> ret = new CommonsHashSet <> (); if (m_aOutgoing != null) CollectionHelper.findAllMapped (m_aOutgoing.values (), IMutableDirectedGraphRelation::getTo, ret::add); return ret; }
Example 3
Source File: ICommonsIterable.java From ph-commons with Apache License 2.0 | 3 votes |
/** * Find all elements matching the provided filter, convert the matching * elements using the provided function and invoke the provided consumer for * all mapped elements. * * @param aFilter * The filter to be applied. May be <code>null</code>. * @param aMapper * The mapping function to be executed for all matching elements. May * not be <code>null</code>. * @param aConsumer * The consumer to be invoked for all matching mapped elements. May not * be <code>null</code>. * @param <DSTTYPE> * The destination type to be mapped to */ default <DSTTYPE> void findAllMapped (@Nullable final Predicate <? super ELEMENTTYPE> aFilter, @Nonnull final Function <? super ELEMENTTYPE, DSTTYPE> aMapper, @Nonnull final Consumer <? super DSTTYPE> aConsumer) { CollectionHelper.findAllMapped (this, aFilter, aMapper, aConsumer); }
Example 4
Source File: ICommonsIterable.java From ph-commons with Apache License 2.0 | 3 votes |
/** * Convert all elements using the provided function, find all mapped elements * matching the provided filter and invoke the provided consumer for all * matching elements. * * @param aMapper * The mapping function to be executed for all matching elements. May * not be <code>null</code>. * @param aFilter * The filter to be applied. May be <code>null</code>. * @param aConsumer * The consumer to be invoked for all matching mapped elements. May not * be <code>null</code>. * @param <DSTTYPE> * The destination type to be mapped to * @since 8.5.2 */ default <DSTTYPE> void findAllMapped (@Nonnull final Function <? super ELEMENTTYPE, DSTTYPE> aMapper, @Nullable final Predicate <? super DSTTYPE> aFilter, @Nonnull final Consumer <? super DSTTYPE> aConsumer) { CollectionHelper.findAllMapped (this, aMapper, aFilter, aConsumer); }
Example 5
Source File: ICommonsIterable.java From ph-commons with Apache License 2.0 | 2 votes |
/** * Convert all elements using the provided function and invoke the provided * consumer for all mapped elements. * * @param aMapper * The mapping function to be executed for all elements. May not be * <code>null</code>. * @param aConsumer * The consumer to be invoked for all mapped elements. May not be * <code>null</code>. * @param <DSTTYPE> * The destination type to be mapped to */ default <DSTTYPE> void findAllMapped (@Nonnull final Function <? super ELEMENTTYPE, DSTTYPE> aMapper, @Nonnull final Consumer <? super DSTTYPE> aConsumer) { CollectionHelper.findAllMapped (this, aMapper, aConsumer); }