org.apache.commons.collections.functors
Class TransformedPredicate
java.lang.Objectorg.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: 646777 $ $Date: 2008-04-10 13:33:15 +0100 (Thu, 10 Apr 2008) $- 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-2008 Apache Software Foundation. All Rights Reserved.