public final class OrPredicate extends Object implements Predicate, PredicateDecorator, Serializable
Constructor and Description |
---|
OrPredicate(Predicate predicate1,
Predicate predicate2)
Constructor that performs no validation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
evaluate(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
predicateIllegalArgumentException
- if either predicate is nullpublic boolean evaluate(Object object)
public Predicate[] getPredicates()
getPredicates
in interface PredicateDecorator
Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.