public final class NullIsExceptionPredicate<T> extends Object implements PredicateDecorator<T>, Serializable
Constructor and Description |
---|
NullIsExceptionPredicate(Predicate<? super T> predicate)
Constructor that performs no validation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
evaluate(T object)
Evaluates the predicate returning the result of the decorated predicate
once a null check is performed.
|
Predicate<? super T>[] |
getPredicates()
Gets the predicate being decorated.
|
static <T> Predicate<T> |
nullIsExceptionPredicate(Predicate<? super T> predicate)
Factory to create the null exception predicate.
|
public NullIsExceptionPredicate(Predicate<? super T> predicate)
nullIsExceptionPredicate
if you want that.predicate
- the predicate to call after the null checkpublic static <T> Predicate<T> nullIsExceptionPredicate(Predicate<? super T> predicate)
T
- the type that the predicate queriespredicate
- the predicate to decorate, not nullNullPointerException
- if the predicate is nullpublic boolean evaluate(T object)
evaluate
in interface Predicate<T>
object
- the input objectFunctorException
- if input is nullpublic Predicate<? super T>[] getPredicates()
getPredicates
in interface PredicateDecorator<T>
Copyright © 2001–2018 The Apache Software Foundation. All rights reserved.