Class GeneratorContains.ContainsProcedure<T>
- java.lang.Object
-
- org.apache.commons.functor.core.algorithm.GeneratorContains.ContainsProcedure<T>
-
- Type Parameters:
T- the predicate argument type.
- All Implemented Interfaces:
Functor,UnaryFunctor<T>,UnaryProcedure<T>
- Enclosing class:
- GeneratorContains<T>
private static class GeneratorContains.ContainsProcedure<T> extends java.lang.Object implements UnaryProcedure<T>
Helper procedure.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanfoundFlag to mark if the wrapped predicate succeeded or not.private UnaryPredicate<? super T>predThe wrapped predicate.
-
Constructor Summary
Constructors Constructor Description ContainsProcedure(UnaryPredicate<? super T> pred)Create a new ContainsProcedure.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrun(T obj)Execute this procedure.
-
-
-
Field Detail
-
pred
private final UnaryPredicate<? super T> pred
The wrapped predicate.
-
found
private boolean found
Flag to mark if the wrapped predicate succeeded or not.
-
-
Constructor Detail
-
ContainsProcedure
public ContainsProcedure(UnaryPredicate<? super T> pred)
Create a new ContainsProcedure.- Parameters:
pred- The wrapped predicate
-
-
Method Detail
-
run
public void run(T obj)
Execute this procedure.- Specified by:
runin interfaceUnaryProcedure<T>- Parameters:
obj- an A parameter to this execution
-
-