|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.collections15.functors.predicate.AbstractMultplePredicateDecorator<E> net.sf.collections15.functors.predicate.AllPredicate<E>
public final class AllPredicate<E>
Predicate
implementation that returns true
only if
all the Predicate
s return true. i.e. it returns the logical AND
of the wrapped Predicates
.
AllPredicate
will evaluate to
true
unless any of its wrapped Predicate
s evaluate
to false
. This implies that if its collection of wrapped
Predicate
s is empty, an AllPredicate
will always
evaluate to true
.
Field Summary |
---|
Fields inherited from class net.sf.collections15.functors.predicate.AbstractMultplePredicateDecorator |
---|
decoratedPredicates |
Constructor Summary | |
---|---|
protected |
AllPredicate(java.util.Collection<Predicate<? super E>> predicates)
Creates a new instance that wraps the specified collection of Predicate s. |
Method Summary | ||
---|---|---|
boolean |
evaluate(E object)
Evaluates the Predicate , returning true unless
any of the wrapped Predicate s returns false . |
|
static
|
getInstance(java.util.Collection<Predicate<? super T>> predicates)
Returns an instance that wraps the specified collection of Predicate s. |
Methods inherited from class net.sf.collections15.functors.predicate.AbstractMultplePredicateDecorator |
---|
getDecoratedPredicates |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AllPredicate(java.util.Collection<Predicate<? super E>> predicates)
Predicate
s.
predicates
- The java.lang.IllegalArgumentException
- Thrown if the collection, or any of its
elements are null
. The
collection may be empty, however, in
which case the resulting AllPredicate
will always return true
.Method Detail |
---|
public static <T> AllPredicate<T> getInstance(java.util.Collection<Predicate<? super T>> predicates)
Predicate
s.
predicates
- The Predicate
instance that will evaluate to
true
unless any of the wrapped Predicate
s
evaluate to false
.
java.lang.IllegalArgumentException
- Thrown if the collection, or any of its
elements are null
. The
collection may be empty, however, in
which case the resulting AllPredicate
will always return true
.public boolean evaluate(E object)
Predicate
, returning true
unless
any of the wrapped Predicate
s returns false
.
object
- The input object to evaluate.
true
unless any of the wrapped Predicate
s
evaluates to false
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |