org.apache.commons.collections.functors
Class TransformedPredicate
java.lang.Object
org.apache.commons.collections.functors.TransformedPredicate
- Predicate, PredicateDecorator, Serializable
public final class TransformedPredicate
extends java.lang.Object
Predicate implementation that transforms the given object before invoking
another Predicate
.
$Revision: 1.4 $ $Date: 2004/05/31 16:43:17 $- Alban Peignier
- Stephen Colebourne
TransformedPredicate
public TransformedPredicate(Transformer transformer,
Predicate predicate)
Constructor that performs no validation.
Use getInstance
if you want that.
transformer
- the transformer to usepredicate
- the predicate to decorate
evaluate
public boolean evaluate(Object object)
Evaluates the predicate returning the result of the decorated predicate
once the input has been transformed
- evaluate in interface Predicate
object
- the input object which will be transformed
- true if decorated predicate returns true
getInstance
public static Predicate getInstance(Transformer transformer,
Predicate predicate)
Factory to create the predicate.
transformer
- the transformer to callpredicate
- the predicate to call with the result of the transform
getTransformer
public Transformer getTransformer()
Gets the transformer in use.
Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.