public final class TransformerPredicate<T> extends Objectimplements Predicate <T>, Serializable
| Constructor and Description |
|---|
TransformerPredicate(Transformer
Constructor that performs no validation.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
evaluate(T object)
Evaluates the predicate returning the result of the decorated transformer.
|
Transformer |
getTransformer()
Gets the transformer.
|
static <T> Predicate |
transformerPredicate(Transformer
Factory to create the predicate.
|
public TransformerPredicate(Transformer<? super T ,Boolean > transformer)
transformerPredicate if you want that.
transformer - the transformer to decorate
public static <T> Predicate<T> transformerPredicate(Transformer <? super T ,Boolean > transformer)
T - the type that the predicate queries
transformer - the transformer to decorate
NullPointerException - if the transformer is null
public boolean evaluate(T object)
evaluate in interface
Predicate<T>
object - the input object
FunctorException - if the transformer returns an invalid type
public Transformer<? super T ,Boolean > getTransformer()