|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.collections.functors.AllPredicate<T>
public final class AllPredicate<T>
Predicate implementation that returns true if all the predicates return true.
Constructor Summary | |
---|---|
AllPredicate(Predicate<? super T>[] predicates)
Constructor that performs no validation. |
Method Summary | ||
---|---|---|
boolean |
evaluate(T object)
Evaluates the predicate returning true if all predicates return true. |
|
static
|
getInstance(Collection<Predicate<? super T>> predicates)
Factory to create the predicate. |
|
static
|
getInstance(Predicate<? super T>[] predicates)
Factory to create the predicate. |
|
Predicate<? super T>[] |
getPredicates()
Gets the predicates, do not modify the array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AllPredicate(Predicate<? super T>[] predicates)
getInstance
if you want that.
predicates
- the predicates to check, not cloned, not nullMethod Detail |
---|
public static <T> Predicate<T> getInstance(Predicate<? super T>[] predicates)
predicates
- the predicates to check, cloned, not null
all
predicate
IllegalArgumentException
- if the predicates array is null
IllegalArgumentException
- if the predicates array has less than 2 elements
IllegalArgumentException
- if any predicate in the array is nullpublic static <T> Predicate<T> getInstance(Collection<Predicate<? super T>> predicates)
predicates
- the predicates to check, cloned, not null
all
predicate
IllegalArgumentException
- if the predicates array is null
IllegalArgumentException
- if any predicate in the array is null
IllegalArgumentException
- if the predicates array has less than 2 elementspublic boolean evaluate(T object)
evaluate
in interface Predicate<T>
object
- the input object
public Predicate<? super T>[] getPredicates()
getPredicates
in interface PredicateDecorator<T>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |