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