|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.collections.functors.TransformedPredicate
public final class TransformedPredicate
Predicate implementation that transforms the given object before invoking
another Predicate
.
Constructor Summary | |
---|---|
TransformedPredicate(Transformer transformer,
Predicate predicate)
Constructor that performs no validation. |
Method Summary | |
---|---|
boolean |
evaluate(java.lang.Object object)
Evaluates the predicate returning the result of the decorated predicate once the input has been transformed |
static Predicate |
getInstance(Transformer transformer,
Predicate predicate)
Factory to create the predicate. |
Predicate[] |
getPredicates()
Gets the predicate being decorated. |
Transformer |
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 transformer, Predicate predicate)
getInstance
if you want that.
transformer
- the transformer to usepredicate
- the predicate to decorateMethod Detail |
---|
public static Predicate getInstance(Transformer transformer, Predicate predicate)
transformer
- the transformer to callpredicate
- the predicate to call with the result of the transform
java.lang.IllegalArgumentException
- if the transformer or the predicate is nullpublic boolean evaluate(java.lang.Object object)
evaluate
in interface Predicate
object
- the input object which will be transformed
public Predicate[] getPredicates()
getPredicates
in interface PredicateDecorator
public Transformer getTransformer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |