|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.collections15.functors.TransformedPredicate<I,O>
public final class TransformedPredicate<I,O>
Predicate implementation that transforms the given object before invoking
another Predicate.
Note: This class cannot suppport generics without breaking the PredicateDecorator interface.
| Constructor Summary | |
|---|---|
TransformedPredicate(Transformer<? super I,? extends O> transformer,
Predicate<? super O> predicate)
Constructor that performs no validation. |
|
| Method Summary | ||
|---|---|---|
boolean |
evaluate(I object)
Evaluates the predicate returning the result of the decorated predicate once the input has been transformed |
|
static
|
getInstance(Transformer<? super I,? extends O> transformer,
Predicate<? super O> predicate)
Factory to create the predicate. |
|
Predicate[] |
getPredicates()
Gets the predicate being decorated. |
|
Transformer<? super I,? extends O> |
getTransformer()
Gets the transformer in use. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TransformedPredicate(Transformer<? super I,? extends O> transformer,
Predicate<? super O> predicate)
getInstance if you want that.
transformer - the transformer to usepredicate - the predicate to decorate| Method Detail |
|---|
public static <I,O> Predicate<I> getInstance(Transformer<? super I,? extends O> transformer,
Predicate<? super O> predicate)
transformer - 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(I object)
evaluate in interface Predicate<I>object - the input object which will be transformed
public Predicate[] getPredicates()
getPredicates in interface PredicateDecorator<I>public Transformer<? super I,? extends O> getTransformer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||