java.io.Serializable
, PredicateDecorator<T>
, Predicate<T>
public final class NotPredicate<T> extends java.lang.Object implements PredicateDecorator<T>, java.io.Serializable
Constructor | Description |
---|---|
NotPredicate(Predicate<? super T> predicate) |
Constructor that performs no validation.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
evaluate(T object) |
Evaluates the predicate returning the opposite to the stored predicate.
|
Predicate<? super T>[] |
getPredicates() |
Gets the predicate being decorated.
|
static <T> Predicate<T> |
notPredicate(Predicate<? super T> predicate) |
Factory to create the not predicate.
|
public static <T> Predicate<T> notPredicate(Predicate<? super T> predicate)
T
- the type that the predicate queriespredicate
- the predicate to decorate, not nulljava.lang.NullPointerException
- if the predicate is nullpublic boolean evaluate(T object)
public Predicate<? super T>[] getPredicates()
getPredicates
in interface PredicateDecorator<T>
Copyright © 2001-2019 - Apache Software Foundation