Class SelectProcedure<T>

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

    public final class SelectProcedure<T>
    extends java.lang.Object
    implements Procedure<T>
    Applies a predicate to an object to determine if it should be added to a target collection.
    Since:
    1.0
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      SelectProcedure​(Predicate<? super T> newPredicate, java.util.Collection<T> targetCollection)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Collection<T> 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

      • predicate

        private final Predicate<? super T> predicate
      • collection

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

      • SelectProcedure

        public SelectProcedure​(Predicate<? super T> newPredicate,
                               java.util.Collection<T> targetCollection)
    • Method Detail

      • value

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

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