public final class TransformedPredicate<T> extends Object implements PredicateDecorator<T>, Serializable
Predicate.| Constructor and Description |
|---|
TransformedPredicate(Transformer<? super T,? extends T> transformer,
Predicate<? super T> predicate)
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<? super T>[] |
getPredicates()
Gets the predicate being decorated.
|
Transformer<? super T,? extends T> |
getTransformer()
Gets the transformer in use.
|
static <T> Predicate<T> |
transformedPredicate(Transformer<? super T,? extends T> transformer,
Predicate<? super T> predicate)
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 usepredicate - the predicate to decoratepublic static <T> Predicate<T> transformedPredicate(Transformer<? super T,? extends T> transformer, Predicate<? super T> predicate)
T - the type that the predicate queriestransformer - the transformer to callpredicate - the predicate to call with the result of the transformIllegalArgumentException - if the transformer or the predicate is nullpublic boolean evaluate(T object)
public Predicate<? super T>[] getPredicates()
getPredicates in interface PredicateDecorator<T>public Transformer<? super T,? extends T> getTransformer()
Copyright © 2001–2013 The Apache Software Foundation. All rights reserved.