org.apache.commons.collections.functors
Class PredicateTransformer
java.lang.Object
org.apache.commons.collections.functors.PredicateTransformer
- Serializable, Transformer
public class PredicateTransformer
extends java.lang.Object
Transformer implementation that calls a Predicate using the input object
and then returns the input.
$Revision: 1.5 $ $Date: 2004/05/16 11:36:31 $
PredicateTransformer
public PredicateTransformer(Predicate predicate)
Constructor that performs no validation.
Use getInstance
if you want that.
predicate
- the predicate to call, not null
getInstance
public static Transformer getInstance(Predicate predicate)
Factory method that performs validation.
predicate
- the predicate to call, not null
- the
predicate
transformer
getPredicate
public Predicate getPredicate()
Gets the predicate.
transform
public Object transform(Object input)
Transforms the input to result by calling a predicate.
- transform in interface Transformer
input
- the input object to transform
Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.