|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.collections.functors.PredicateTransformer<T>
public class PredicateTransformer<T>
Transformer implementation that calls a Predicate using the input object and then returns the input.
Constructor Summary | |
---|---|
PredicateTransformer(Predicate<T> predicate)
Constructor that performs no validation. |
Method Summary | ||
---|---|---|
static
|
getInstance(Predicate<T> predicate)
Factory method that performs validation. |
|
Predicate<T> |
getPredicate()
Gets the predicate. |
|
Boolean |
transform(T input)
Transforms the input to result by calling a predicate. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PredicateTransformer(Predicate<T> predicate)
getInstance
if you want that.
predicate
- the predicate to call, not nullMethod Detail |
---|
public static <T> Transformer<T,Boolean> getInstance(Predicate<T> predicate)
predicate
- the predicate to call, not null
predicate
transformer
IllegalArgumentException
- if the predicate is nullpublic Boolean transform(T input)
transform
in interface Transformer<T,Boolean>
input
- the input object to transform
public Predicate<T> getPredicate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |