public final class NullIsExceptionPredicate extends java.lang.Object implements Predicate, PredicateDecorator, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private Predicate |
iPredicate
The predicate to decorate
|
private static long |
serialVersionUID
Serial version UID
|
Constructor and Description |
---|
NullIsExceptionPredicate(Predicate predicate)
Constructor that performs no validation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
evaluate(java.lang.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 exception predicate.
|
Predicate[] |
getPredicates()
Gets the predicate being decorated.
|
private static final long serialVersionUID
private final Predicate iPredicate
public NullIsExceptionPredicate(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 nulljava.lang.IllegalArgumentException
- if the predicate is nullpublic boolean evaluate(java.lang.Object object)
evaluate
in interface Predicate
object
- the input objectFunctorException
- if input is nullpublic Predicate[] getPredicates()
getPredicates
in interface PredicateDecorator