L - the left argument type.R - the right argument type.public final class BinaryAnd<L,R> 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.
Note that although this class implements
Serializable, a given instance will
only be truly Serializable if all the
underlying functors are. Attempts to serialize
an instance whose delegates are not all
Serializable will result in an exception.
| Constructor and Description |
|---|
BinaryAnd()
Create a new BinaryAnd.
|
BinaryAnd(BinaryPredicate<? super L,? super R>... predicates)
Create a new BinaryAnd instance.
|
BinaryAnd(Iterable<BinaryPredicate<? super L,? super R>> predicates)
Create a new BinaryAnd instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addBinaryPredicate(BinaryPredicate<? super L,? super R> p)
Add a BinaryPredicate to the list.
|
BinaryAnd<L,R> |
and(BinaryPredicate<? super L,? super R> p)
And in a BinaryPredicate.
|
boolean |
equals(BinaryAnd<?,?> that)
Learn whether another BinaryAnd is equal to this.
|
boolean |
equals(Object that) |
protected List<BinaryPredicate<? super L,? super R>> |
getBinaryPredicateList()
Get the "live" list of contained
BinaryPredicate instances. |
protected boolean |
getBinaryPredicateListEquals(org.apache.commons.functor.core.composite.BaseBinaryPredicateList<?,?> that)
Learn whether another list is equal to this one.
|
protected int |
getBinaryPredicateListHashCode()
Get a hashCode for the list.
|
protected String |
getBinaryPredicateListToString()
Get a toString for the list.
|
int |
hashCode() |
boolean |
test(L a,
R b)
Evaluate this predicate.
|
String |
toString() |
public BinaryAnd()
public BinaryAnd(BinaryPredicate<? super L,? super R>... predicates)
predicates - the predicates to addpublic BinaryAnd(Iterable<BinaryPredicate<? super L,? super R>> predicates)
predicates - the predicates to addpublic BinaryAnd<L,R> and(BinaryPredicate<? super L,? super R> p)
p - BinaryPredicate to addpublic boolean test(L a, R b)
a - the L element of the ordered pair of argumentsb - the R element of the ordered pair of argumentspublic boolean equals(BinaryAnd<?,?> that)
that - the BinaryAnd to testpublic int hashCode()
protected void addBinaryPredicate(BinaryPredicate<? super L,? super R> p)
p - BinaryPredicate to addprotected List<BinaryPredicate<? super L,? super R>> getBinaryPredicateList()
BinaryPredicate instances.protected boolean getBinaryPredicateListEquals(org.apache.commons.functor.core.composite.BaseBinaryPredicateList<?,?> that)
that - BaseBinaryPredicateList to testprotected int getBinaryPredicateListHashCode()
protected String getBinaryPredicateListToString()
Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.