java.io.Serializable
, Predicate<T>
public final class TransformerPredicate<T> extends java.lang.Object implements Predicate<T>, java.io.Serializable
Constructor | Description |
---|---|
TransformerPredicate(Transformer<? super T,java.lang.Boolean> transformer) |
Constructor that performs no validation.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
evaluate(T object) |
Evaluates the predicate returning the result of the decorated transformer.
|
Transformer<? super T,java.lang.Boolean> |
getTransformer() |
Gets the transformer.
|
static <T> Predicate<T> |
transformerPredicate(Transformer<? super T,java.lang.Boolean> transformer) |
Factory to create the predicate.
|
public TransformerPredicate(Transformer<? super T,java.lang.Boolean> transformer)
transformerPredicate
if you want that.transformer
- the transformer to decoratepublic static <T> Predicate<T> transformerPredicate(Transformer<? super T,java.lang.Boolean> transformer)
T
- the type that the predicate queriestransformer
- the transformer to decoratejava.lang.NullPointerException
- if the transformer is nullpublic boolean evaluate(T object)
evaluate
in interface Predicate<T>
object
- the input objectFunctorException
- if the transformer returns an invalid typepublic Transformer<? super T,java.lang.Boolean> getTransformer()
Copyright © 2001-2019 - Apache Software Foundation