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: 348444 $ $Date: 2005-11-23 14:06:56 +0000 (Wed, 23 Nov 2005) $- 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-2007 Apache Software Foundation. All Rights Reserved.