Class CountProcedure<T>

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

    public class CountProcedure<T>
    extends java.lang.Object
    implements Procedure<T>
    Applies a predicate to an object and increments a count if it returns true.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getCount()  
      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
      • count

        private int count
    • Constructor Detail

      • CountProcedure

        public CountProcedure​(Predicate<? super T> newPredicate)
      • CountProcedure

        public CountProcedure()
    • Method Detail

      • value

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

        public int getCount()