public class PredicateTransformer<T> extends java.lang.Object implements Transformer<T,java.lang.Boolean>, java.io.Serializable
Constructor and Description |
---|
PredicateTransformer(Predicate<? super T> predicate)
Constructor that performs no validation.
|
Modifier and Type | Method and Description |
---|---|
Predicate<? super T> |
getPredicate()
Gets the predicate.
|
static <T> Transformer<T,java.lang.Boolean> |
predicateTransformer(Predicate<? super T> predicate)
Factory method that performs validation.
|
java.lang.Boolean |
transform(T input)
Transforms the input to result by calling a predicate.
|
public static <T> Transformer<T,java.lang.Boolean> predicateTransformer(Predicate<? super T> predicate)
T
- the input typepredicate
- the predicate to call, not nullpredicate
transformerjava.lang.IllegalArgumentException
- if the predicate is nullpublic java.lang.Boolean transform(T input)
transform
in interface Transformer<T,java.lang.Boolean>
input
- the input object to transform"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"