Class CollectProcedure<T,​V>

  • All Implemented Interfaces:
    java.io.Serializable, java.util.function.Consumer<T>, Procedure<T>

    public final class CollectProcedure<T,​V>
    extends java.lang.Object
    implements Procedure<T>
    Applies a function to an object and adds the result to a target collection.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      CollectProcedure​(Function<? super T,​? extends V> function, java.util.Collection<V> targetCollection)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Collection<V> getCollection()  
      void value​(T object)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.Consumer

        andThen
      • Methods inherited from interface org.eclipse.collections.api.block.procedure.Procedure

        accept
    • Field Detail

      • function

        private final Function<? super T,​? extends V> function
      • collection

        private final java.util.Collection<V> collection
    • Constructor Detail

      • CollectProcedure

        public CollectProcedure​(Function<? super T,​? extends V> function,
                                java.util.Collection<V> targetCollection)
    • Method Detail

      • value

        public void value​(T object)
        Specified by:
        value in interface Procedure<T>
      • getCollection

        public java.util.Collection<V> getCollection()