public final class NonePredicate<T> extends AbstractQuantifierPredicate<T>
NOTE: In versions prior to 3.2 an array size of zero or one threw an exception.
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
Serial version UID
|
iPredicates
Constructor and Description |
---|
NonePredicate(Predicate<? super T>... predicates)
Constructor that performs no validation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
evaluate(T object)
Evaluates the predicate returning false if any stored predicate returns false.
|
static <T> Predicate<T> |
nonePredicate(java.util.Collection<? extends Predicate<T>> predicates)
Factory to create the predicate.
|
static <T> Predicate<T> |
nonePredicate(Predicate<? super T>... predicates)
Factory to create the predicate.
|
getPredicates
private static final long serialVersionUID
public static <T> Predicate<T> nonePredicate(Predicate<? super T>... predicates)
If the array is size zero, the predicate always returns true.
T
- the type that the predicate queriespredicates
- the predicates to check, cloned, not nullany
predicatejava.lang.IllegalArgumentException
- if the predicates array is nulljava.lang.IllegalArgumentException
- if any predicate in the array is nullpublic static <T> Predicate<T> nonePredicate(java.util.Collection<? extends Predicate<T>> predicates)
If the collection is size zero, the predicate always returns true.
T
- the type that the predicate queriespredicates
- the predicates to check, cloned, not nullone
predicatejava.lang.IllegalArgumentException
- if the predicates array is nulljava.lang.IllegalArgumentException
- if any predicate in the array is nullpublic boolean evaluate(T object)
object
- the input object