net.sf.molae.pipe.filter
Class PredicateProxy<B extends TypedPredicate<? super T>,T>
java.lang.Object
net.sf.molae.pipe.basic.ObjectProxy<B>
net.sf.molae.pipe.filter.PredicateProxy<B,T>
- All Implemented Interfaces:
- TypedPredicate<T>
public final class PredicateProxy<B extends TypedPredicate<? super T>,T>
- extends ObjectProxy<B>
- implements TypedPredicate<T>
A proxy of a predicate.
Can be used to change the base class.
- Since:
- 2.0
Constructor Summary |
protected |
PredicateProxy(B base)
Constructs a new PredicateProxy object. |
Method Summary |
boolean |
evaluate(T input)
Checks if the specified object fulfils a condition. |
static
|
newInstance(TypedPredicate<? super T> base)
Constructs a new PredicateProxy object. |
PredicateProxy
protected PredicateProxy(B base)
- Constructs a new PredicateProxy object.
- Parameters:
base
- the underlying predicate
- Throws:
NullPointerException
- if the underlying predicate is
null
.
newInstance
public static <T> TypedPredicate<T> newInstance(TypedPredicate<? super T> base)
- Constructs a new PredicateProxy object.
- Parameters:
base
- the underlying predicate
- Throws:
NullPointerException
- if the underlying predicate is
null
.
evaluate
public boolean evaluate(T input)
- Description copied from interface:
TypedPredicate
- Checks if the specified object fulfils a condition.
- Specified by:
evaluate
in interface TypedPredicate<T>
- Parameters:
input
- the object to evaluate, should not be changed
- Returns:
- result of evaluation