public class PredicateTransformer extends Object implements Transformer, 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.
|
Object |
transform(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 transformerIllegalArgumentException - if the predicate is nullpublic Object transform(Object input)
transform in interface Transformerinput - the input object to transformpublic Predicate getPredicate()
Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.