|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.collections4.functors.PredicateTransformer<T>
public class PredicateTransformer<T>
Transformer implementation that calls a Predicate using the input object and then returns the result.
Constructor Summary | |
---|---|
PredicateTransformer(Predicate<? super T> predicate)
Constructor that performs no validation. |
Method Summary | ||
---|---|---|
Predicate<? super T> |
getPredicate()
Gets the predicate. |
|
static
|
predicateTransformer(Predicate<? super T> predicate)
Factory method that performs validation. |
|
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<? super T> predicate)
predicateTransformer
if you want that.
predicate
- the predicate to call, not nullMethod Detail |
---|
public static <T> Transformer<T,Boolean> predicateTransformer(Predicate<? super T> predicate)
T
- the input typepredicate
- 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<? super T> getPredicate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |