public final class AndPredicate<T> extends java.lang.Object implements PredicateDecorator<T>, java.io.Serializable
Constructor and Description |
---|
AndPredicate(Predicate<? super T> predicate1,
Predicate<? super T> predicate2)
Constructor that performs no validation.
|
Modifier and Type | Method and Description |
---|---|
static <T> Predicate<T> |
andPredicate(Predicate<? super T> predicate1,
Predicate<? super T> predicate2)
Factory to create the predicate.
|
boolean |
evaluate(T object)
Evaluates the predicate returning true if both predicates return true.
|
Predicate<? super T>[] |
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 queriespredicate1
- the first predicate to check, not nullpredicate2
- the second predicate to check, not nulland
predicatejava.lang.NullPointerException
- if either predicate is nullpublic boolean evaluate(T object)
public Predicate<? super T>[] getPredicates()
getPredicates
in interface PredicateDecorator<T>
Copyright © 2010 - 2020 Adobe. All Rights Reserved