public final class Or extends Object
Tests true iff
at least one of its children test true.
Note that by this definition, the "or" of
an empty collection of predicates tests false.
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 |
|---|
Or()
Create a new Or.
|
Or(Iterable<Predicate> predicates)
Create a new Or instance.
|
Or(Predicate... predicates)
Create a new Or instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addPredicate(Predicate p)
Add a Predicate to the list.
|
boolean |
equals(Object that) |
boolean |
equals(Or that)
Learn whether another Or is equal to this.
|
protected List<Predicate> |
getPredicateList()
Get the "live" list of
Predicates. |
protected boolean |
getPredicateListEquals(org.apache.commons.functor.core.composite.BasePredicateList that)
Learn whether the list of another BasePredicateList is equal to my list.
|
protected int |
getPredicateListHashCode()
Get a hashCode for my list.
|
protected String |
getPredicateListToString()
Get a toString for my list.
|
int |
hashCode() |
Or |
or(Predicate p)
Fluently add a Predicate.
|
boolean |
test()
Evaluate this predicate.
|
String |
toString() |
public Or()
public Or(Iterable<Predicate> predicates)
predicates - predicates have to be put in or condition.public boolean test()
public boolean equals(Or that)
that - Or to testpublic int hashCode()
protected void addPredicate(Predicate p)
p - Predicate to addprotected List<Predicate> getPredicateList()
Predicates.protected boolean getPredicateListEquals(org.apache.commons.functor.core.composite.BasePredicateList that)
that - BasePredicateList to testprotected int getPredicateListHashCode()
protected String getPredicateListToString()
Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.