public final class AndPredicate<T> extends Objectimplements PredicateDecorator <T>, Serializable
| Constructor and Description |
|---|
AndPredicate(Predicate
Constructor that performs no validation.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Predicate |
andPredicate(Predicate
Factory to create the predicate.
|
boolean |
evaluate(T object)
Evaluates the predicate returning true if both predicates return true.
|
Predicate |
getPredicates()
Gets the two predicates being decorated as an array.
|
public static <T> Predicate<T> andPredicate(Predicate <? super T> predicate1, Predicate <? super T> predicate2)
T - the type that the predicate queries
predicate1 - the first predicate to check, not null
predicate2 - the second predicate to check, not null
and predicate
NullPointerException - if either predicate is null
public boolean evaluate(T object)
public Predicate<? super T>[] getPredicates()
getPredicates in interface
PredicateDecorator<T>