A
- the predicate argument type.public final class Or<A> 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
.Constructor and Description |
---|
Or()
Create a new Or.
|
Or(Iterable<Predicate<? super A>> predicates)
Create a new Or instance.
|
Or(Predicate<? super A>... predicates)
Create a new Or instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addPredicate(Predicate<? super A> p)
Add a Predicate to the list.
|
boolean |
equals(Object obj) |
protected List<Predicate<? super A>> |
getPredicateList()
Get the "live" list of contained
Predicate s. |
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() |
Or<A> |
or(Predicate<? super A> p)
Fluently add a Predicate.
|
boolean |
test(A a)
Evaluate this predicate.
|
String |
toString() |
public Or()
public Or(Iterable<Predicate<? super A>> predicates)
predicates
- the predicates to put in or.public Or<A> or(Predicate<? super A> p)
p
- Predicate to addpublic boolean test(A a)
a
- the A object to testpublic int hashCode()
protected void addPredicate(Predicate<? super A> p)
p
- Predicate to addprotected List<Predicate<? super A>> getPredicateList()
Predicate
s.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.