public final class AllPredicate<T> extends AbstractQuantifierPredicate<T>
NOTE: In versions prior to 3.2 an array size of zero or one threw an exception.
iPredicates| Constructor and Description |
|---|
AllPredicate(Predicate
Constructor that performs no validation.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Predicate |
allPredicate(Collection
Factory to create the predicate.
|
static <T> Predicate |
allPredicate(Predicate
Factory to create the predicate.
|
boolean |
evaluate(T object)
Evaluates the predicate returning true if all predicates return true.
|
getPredicatespublic static <T> Predicate<T> allPredicate(Predicate <? super T>... predicates)
If the array is size zero, the predicate always returns true. If the array is size one, then that predicate is returned.
T - the type that the predicate queries
predicates - the predicates to check, cloned, not null
all predicate
NullPointerException - if the predicates array is null
NullPointerException - if any predicate in the array is null
public static <T> Predicate<T> allPredicate(Collection <? extends Predicate <? super T>> predicates)
If the collection is size zero, the predicate always returns true. If the collection is size one, then that predicate is returned.
T - the type that the predicate queries
predicates - the predicates to check, cloned, not null
all predicate
NullPointerException - if the predicates array is null
NullPointerException - if any predicate in the array is null
public boolean evaluate(T object)
object - the input object