public class PredicateTransformer<T> extends Objectimplements Transformer <T ,Boolean >, Serializable
| Constructor and Description |
|---|
PredicateTransformer(Predicate
Constructor that performs no validation.
|
| Modifier and Type | Method and Description |
|---|---|
Predicate |
getPredicate()
Gets the predicate.
|
static <T> Transformer |
predicateTransformer(Predicate
Factory method that performs validation.
|
Boolean |
transform(T input)
Transforms the input to result by calling a predicate.
|
public static <T> Transformer<T ,Boolean > predicateTransformer(Predicate <? super T> predicate)
T - the input type
predicate - the predicate to call, not null
predicate transformer
IllegalArgumentException - if the predicate is null
public Booleantransform(T input)
transform in interface
Transformer<T,Boolean>
input - the input object to transform