A - the predicate argument type.public final class And<A> extends Object
Tests true iff
none of its children test false.
Note that by this definition, the "and" of
an empty collection of predicates tests true.| Constructor and Description |
|---|
And()
Create a new And.
|
And(Iterable<Predicate<? super A>> predicates)
Create a new And instance.
|
And(Predicate<? super A>... predicates)
Create a new And instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addPredicate(Predicate<? super A> p)
Add a Predicate to the list.
|
And<A> |
and(Predicate<? super A> p)
Fluently add a Predicate.
|
boolean |
equals(Object obj) |
protected List<Predicate<? super A>> |
getPredicateList()
Get the "live" list of contained
Predicates. |
protected boolean |
getPredicateListEquals(org.apache.commons.functor.core.composite.BasePredicateList<?> that)
Learn whether another BasePredicateList has content equal to this.
|
protected int |
getPredicateListHashCode()
Get a hashCode for the list.
|
protected String |
getPredicateListToString()
Get a toString for the list.
|
int |
hashCode() |
boolean |
test(A obj)
Evaluate this predicate.
|
String |
toString() |
public And()
public And(Iterable<Predicate<? super A>> predicates)
predicates - the predicates to put in and.public And<A> and(Predicate<? super A> p)
p - Predicate to addpublic boolean test(A obj)
obj - the A object to testpublic int hashCode()
protected void addPredicate(Predicate<? super A> p)
p - Predicate to addprotected List<Predicate<? super A>> getPredicateList()
Predicates.protected boolean getPredicateListEquals(org.apache.commons.functor.core.composite.BasePredicateList<?> that)
that - the BasePredicateList to testprotected int getPredicateListHashCode()
protected String getPredicateListToString()
Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.