Class CollectProcedure<T,V>

All Implemented Interfaces:
Serializable, Consumer<T>, Procedure<T>

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

    • CollectProcedure

      public CollectProcedure(Function<? super T,? extends V> function, Collection<V> targetCollection)
  • Method Details

    • value

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

      public Collection<V> getCollection()