A - the predicate argument type.public final class UnaryAnd<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.
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 |
|---|
UnaryAnd()
Create a new UnaryAnd.
|
UnaryAnd(Iterable<UnaryPredicate<? super A>> predicates)
Create a new UnaryAnd instance.
|
UnaryAnd(UnaryPredicate<? super A>... predicates)
Create a new UnaryAnd instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addUnaryPredicate(UnaryPredicate<? super A> p)
Add a UnaryPredicate to the list.
|
UnaryAnd<A> |
and(UnaryPredicate<? super A> p)
Fluently add a UnaryPredicate.
|
boolean |
equals(Object that) |
boolean |
equals(UnaryAnd<?> that)
Learn whether another UnaryAnd is equal to this.
|
protected List<UnaryPredicate<? super A>> |
getUnaryPredicateList()
Get the "live" list of contained
UnaryPredicates. |
protected boolean |
getUnaryPredicateListEquals(org.apache.commons.functor.core.composite.BaseUnaryPredicateList<?> that)
Learn whether another BaseUnaryPredicateList has content equal to this.
|
protected int |
getUnaryPredicateListHashCode()
Get a hashCode for the list.
|
protected String |
getUnaryPredicateListToString()
Get a toString for the list.
|
int |
hashCode() |
boolean |
test(A obj)
Evaluate this predicate.
|
String |
toString() |
public UnaryAnd()
public UnaryAnd(Iterable<UnaryPredicate<? super A>> predicates)
predicates - the predicates to put in unary and.public UnaryAnd(UnaryPredicate<? super A>... predicates)
predicates - the predicates to put in unary and.public UnaryAnd<A> and(UnaryPredicate<? super A> p)
p - UnaryPredicate to addpublic boolean test(A obj)
obj - the A object to testpublic boolean equals(UnaryAnd<?> that)
that - UnaryAnd to testpublic int hashCode()
protected void addUnaryPredicate(UnaryPredicate<? super A> p)
p - UnaryPredicate to addprotected List<UnaryPredicate<? super A>> getUnaryPredicateList()
UnaryPredicates.protected boolean getUnaryPredicateListEquals(org.apache.commons.functor.core.composite.BaseUnaryPredicateList<?> that)
that - the BaseUnaryPredicateList to testprotected int getUnaryPredicateListHashCode()
protected String getUnaryPredicateListToString()
Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.