Class PredicateUtils
java.lang.Object
org.codice.ddf.test.common.function.PredicateUtils
This class provides utilities for working with predicates.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Predicate<T>Returns a new predicate that will reporttrueif all provided predicates reporttruefor the tested argument.static <T> Predicate<T>Returns a new predicate that will reporttrueif any of the provided predicates reporttruefor the tested argument.
-
Method Details
-
allOf
Returns a new predicate that will reporttrueif all provided predicates reporttruefor the tested argument.- Type Parameters:
T- the type of object being tested- Parameters:
predicates- the set of predicates to test with- Returns:
- a new predicate that expects all given predicates to return
truefor the tested argument in order to returntrue
-
anyOf
Returns a new predicate that will reporttrueif any of the provided predicates reporttruefor the tested argument.- Type Parameters:
T- the type of object being tested- Parameters:
predicates- the set of predicates to test with- Returns:
- a new predicate that expects any given predicates to return
truefor the tested argument in order to returntrue
-