| Modifier and Type | Method and Description |
|---|---|
static <T> CompositePredicate<T> |
of(Predicate<T>... predicates)
Creates a new instance which aggregates the given
predicates. |
boolean |
test(T t)
Tests the value with all the aggregated predicates.
|
public static <T> CompositePredicate<T> of(Predicate<T>... predicates)
predicates.
If predicates is null or empty, then the returned
instance will return true for any valueT - the generic type of the predicatepredicates - the predicates to aggregateCompositePredicatepublic boolean test(T t)
The predicates will be evaluated in the same order as they were
fed into the of(Predicate[]) method. If one predicate
returns false, then the subsequent ones will not be evaluated
and this method will return false.
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.