public final class OrPredicate extends java.lang.Object implements Predicate, PredicateDecorator, java.io.Serializable
Constructor and Description |
---|
OrPredicate(Predicate predicate1,
Predicate predicate2)
Constructor that performs no validation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
evaluate(java.lang.Object object)
Evaluates the predicate returning true if either predicate returns true.
|
static Predicate |
getInstance(Predicate predicate1,
Predicate predicate2)
Factory to create the predicate.
|
Predicate[] |
getPredicates()
Gets the two predicates being decorated as an array.
|
public static Predicate getInstance(Predicate predicate1, Predicate predicate2)
predicate1
- the first predicate to check, not nullpredicate2
- the second predicate to check, not nulland
predicatejava.lang.IllegalArgumentException
- if either predicate is nullpublic boolean evaluate(java.lang.Object object)
public Predicate[] getPredicates()
getPredicates
in interface PredicateDecorator
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"