Class FindWithinGenerator.FindProcedure<T>
- java.lang.Object
-
- org.apache.commons.functor.core.algorithm.FindWithinGenerator.FindProcedure<T>
-
- Type Parameters:
T- the argument type.
- All Implemented Interfaces:
Functor,UnaryFunctor<T>,UnaryProcedure<T>
- Enclosing class:
- FindWithinGenerator<E>
private static class FindWithinGenerator.FindProcedure<T> extends java.lang.Object implements UnaryProcedure<T>
Helper procedure.
-
-
Constructor Summary
Constructors Constructor Description FindProcedure(UnaryPredicate<? super T> pred)Create a new FindProcedure.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrun(T obj)Execute this procedure.
-
-
-
Field Detail
-
found
private T found
The object found, if any.
-
wasFound
private boolean wasFound
Flag to mark an object has been found.
-
pred
private UnaryPredicate<? super T> pred
The adapted predicate.
-
-
Constructor Detail
-
FindProcedure
public FindProcedure(UnaryPredicate<? super T> pred)
Create a new FindProcedure.- Parameters:
pred- the adapted 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
-
-