|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.collections4.functors.TransformedPredicate<T>
public final class TransformedPredicate<T>
Predicate implementation that transforms the given object before invoking
another Predicate
.
Constructor Summary | |
---|---|
TransformedPredicate(Transformer<? super T,? extends T> transformer,
Predicate<? super T> predicate)
Constructor that performs no validation. |
Method Summary | ||
---|---|---|
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
|
transformedPredicate(Transformer<? super T,? extends T> transformer,
Predicate<? super T> predicate)
Factory to create the predicate. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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 decorateMethod Detail |
---|
public 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 transform
IllegalArgumentException
- if the transformer or the predicate is nullpublic boolean evaluate(T object)
evaluate
in interface Predicate<T>
object
- the input object which will be transformed
public Predicate<? super T>[] getPredicates()
getPredicates
in interface PredicateDecorator<T>
public Transformer<? super T,? extends T> getTransformer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |