public final class AndPredicate extends java.lang.Object implements Predicate, PredicateDecorator, java.io.Serializable
| Constructor and Description |
|---|
AndPredicate(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 both predicates return 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 PredicateDecoratorCopyright © 2010 - 2023 Adobe. All Rights Reserved