|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.collections.functors.TransformerPredicate<T>
public final class TransformerPredicate<T>
Predicate implementation that returns the result of a transformer.
Constructor Summary | |
---|---|
TransformerPredicate(Transformer<T,Boolean> transformer)
Constructor that performs no validation. |
Method Summary | ||
---|---|---|
boolean |
evaluate(T object)
Evaluates the predicate returning the result of the decorated transformer. |
|
static
|
getInstance(Transformer<T,Boolean> transformer)
Factory to create the predicate. |
|
Transformer<T,Boolean> |
getTransformer()
Gets the transformer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TransformerPredicate(Transformer<T,Boolean> transformer)
getInstance
if you want that.
transformer
- the transformer to decorateMethod Detail |
---|
public static <T> Predicate<T> getInstance(Transformer<T,Boolean> transformer)
transformer
- the transformer to decorate
IllegalArgumentException
- if the transformer is nullpublic boolean evaluate(T object)
evaluate
in interface Predicate<T>
object
- the input object
FunctorException
- if the transformer returns an invalid typepublic Transformer<T,Boolean> getTransformer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |