Class AllPredicate<T>
java.lang.Object
org.apache.commons.collections4.functors.AbstractPredicate<T>
org.apache.commons.collections4.functors.AbstractQuantifierPredicate<T>
org.apache.commons.collections4.functors.AllPredicate<T>
- Type Parameters:
- T- the type of the input to the predicate.
- All Implemented Interfaces:
- Serializable,- Predicate<T>,- PredicateDecorator<T>,- Predicate<T>
Predicate implementation that returns true if all the
 predicates return true.
 If the array of predicates is empty, then this predicate returns true.
 
NOTE: In versions prior to 3.2 an array size of zero or one threw an exception.
- Since:
- 3.0
- See Also:
- 
Field SummaryFields inherited from class org.apache.commons.collections4.functors.AbstractQuantifierPredicateiPredicates
- 
Constructor SummaryConstructorsConstructorDescriptionAllPredicate(Predicate<? super T>... predicates) Constructor that performs no validation.
- 
Method SummaryModifier and TypeMethodDescriptionstatic <T> Predicate<T> allPredicate(Collection<? extends Predicate<? super T>> predicates) Creates the predicate.static <T> Predicate<T> allPredicate(Predicate<? super T>... predicates) Creates the predicate.booleanEvaluates the predicate returning true if all predicates return true.Methods inherited from class org.apache.commons.collections4.functors.AbstractQuantifierPredicategetPredicatesMethods inherited from class org.apache.commons.collections4.functors.AbstractPredicateevaluate
- 
Constructor Details- 
AllPredicateConstructor that performs no validation. UseallPredicateif you want that.- Parameters:
- predicates- the predicates to check, not cloned, not null
 
 
- 
- 
Method Details- 
allPredicateCreates the predicate.If the collection is size zero, the predicate always returns true. If the collection is size one, then that predicate is returned. - Type Parameters:
- T- the type that the predicate queries
- Parameters:
- predicates- the predicates to check, cloned, not null
- Returns:
- the allpredicate
- Throws:
- NullPointerException- if the predicates array is null
- NullPointerException- if any predicate in the array is null
 
- 
allPredicateCreates the predicate.If the array is size zero, the predicate always returns true. If the array is size one, then that predicate is returned. - Type Parameters:
- T- the type that the predicate queries
- Parameters:
- predicates- the predicates to check, cloned, not null
- Returns:
- the allpredicate
- Throws:
- NullPointerException- if the predicates array is null
- NullPointerException- if any predicate in the array is null
 
- 
test
 
-