public final class NullIsTruePredicate extends Object implements Predicate, PredicateDecorator, Serializable
| Constructor and Description |
|---|
NullIsTruePredicate(Predicate predicate)
Constructor that performs no validation.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
evaluate(Object object)
Evaluates the predicate returning the result of the decorated predicate
once a null check is performed.
|
static Predicate |
getInstance(Predicate predicate)
Factory to create the null true predicate.
|
Predicate[] |
getPredicates()
Gets the predicate being decorated.
|
public NullIsTruePredicate(Predicate predicate)
getInstance if you want that.predicate - the predicate to call after the null checkpublic static Predicate getInstance(Predicate predicate)
predicate - the predicate to decorate, not nullIllegalArgumentException - if the predicate is nullpublic boolean evaluate(Object object)
public Predicate[] getPredicates()
getPredicates in interface PredicateDecoratorCopyright © 2001–2015 The Apache Software Foundation. All rights reserved.