public final class TransformedPredicate<T> extends Objectimplements PredicateDecorator <T>, Serializable
Predicate.
| Constructor and Description |
|---|
TransformedPredicate(Transformer
Constructor that performs no validation.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
evaluate(T object)
Evaluates the predicate returning the result of the decorated predicate once the input has been transformed
|
Predicate |
getPredicates()
Gets the predicate being decorated.
|
Transformer |
getTransformer()
Gets the transformer in use.
|
static <T> Predicate |
transformedPredicate(Transformer
Factory to create the predicate.
|
public TransformedPredicate(Transformer<? super T ,? extends T> transformer, Predicate <? super T> predicate)
transformedPredicate if you want that.
transformer - the transformer to use
predicate - the predicate to decorate
public static <T> Predicate<T> transformedPredicate(Transformer <? super T ,? extends T> transformer, Predicate <? super T> predicate)
T - the type that the predicate queries
transformer - the transformer to call
predicate - the predicate to call with the result of the transform
NullPointerException - if the transformer or the predicate is null
public boolean evaluate(T object)
public Predicate<? super T>[] getPredicates()
getPredicates in interface
PredicateDecorator<T>
public Transformer<? super T ,? extends T> getTransformer()