org.apache.commons.collections.functors
Class TransformerPredicate
- Predicate, Serializable
public final class TransformerPredicate
Predicate implementation that returns the result of a transformer.
Version:
- Stephen Colebourne
- Commons Collections 3.0
TransformerPredicate
public TransformerPredicate(Transformer transformer)
Constructor that performs no validation.
Use getInstance
if you want that.
transformer
- the transformer to decorate
evaluate
public boolean evaluate(Object object)
Evaluates the predicate returning the result of the decorated transformer.
- evaluate in interface Predicate
object
- the input object
- true if decorated transformer returns Boolean.TRUE
getInstance
public static Predicate getInstance(Transformer transformer)
Factory to create the predicate.
transformer
- the transformer to decorate
- the predicate
getTransformer
public Transformer getTransformer()
Gets the transformer.
- the transformer
- Commons Collections 3.1
Copyright © 2001-2005 Apache Software Foundation. All Rights Reserved.