|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.collections15.functors.OrPredicate<T>
public final class OrPredicate<T>
Predicate implementation that returns true if either of the predicates return true.
| Constructor Summary | |
|---|---|
OrPredicate(Predicate<? super T> predicate1,
Predicate<? super T> predicate2)
Constructor that performs no validation. |
|
| Method Summary | ||
|---|---|---|
boolean |
evaluate(T object)
Evaluates the predicate returning true if either predicate returns true. |
|
static
|
getInstance(Predicate<? super T> predicate1,
Predicate<? super T> predicate2)
Factory to create the predicate. |
|
Predicate<? super T>[] |
getPredicates()
Gets the two predicates being decorated as an array. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OrPredicate(Predicate<? super T> predicate1,
Predicate<? super T> predicate2)
getInstance if you want that.
predicate1 - the first predicate to check, not nullpredicate2 - the second predicate to check, not null| Method Detail |
|---|
public static <T> Predicate<T> getInstance(Predicate<? super T> predicate1,
Predicate<? super T> predicate2)
predicate1 - the first predicate to check, not nullpredicate2 - the second predicate to check, not null
and predicate
IllegalArgumentException - if either predicate is nullpublic boolean evaluate(T object)
evaluate in interface Predicate<T>object - the input object
public Predicate<? super T>[] getPredicates()
getPredicates in interface PredicateDecorator<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||