public final class PredicateUtils extends Object
Modifier and Type | Field and Description |
---|---|
static Set<Class<? extends Predicate>> |
SUPPORTED_PREDICATES
Supported predicates which are not filtered out in the
removeNotSupportedPredicates(List) (List)} method. |
Modifier and Type | Method and Description |
---|---|
static void |
assertNoNullPredicates(List<? extends Predicate> predicates)
Asserts that all given predicates are not null.
|
static boolean |
containsPredicate(Predicate predicateToCheck,
Class<? extends Predicate> predicateClass)
Returns true if the given
Predicate class is contained in the given predicate to check. |
static <T extends Predicate> |
removeEmptyPredicates(List<? extends T> predicates)
Removes all empty predicates from the given non-null predicates.
|
static <T extends Predicate> |
removeNotSupportedPredicates(List<? extends T> predicates)
Removes all not supported (
SUPPORTED_PREDICATES ) predicates from the given non-null predicates. |
public static final Set<Class<? extends Predicate>> SUPPORTED_PREDICATES
removeNotSupportedPredicates(List)
(List)} method.public static void assertNoNullPredicates(List<? extends Predicate> predicates)
predicates
- the predicates to assertpublic static <T extends Predicate> com.google.common.collect.ImmutableList<T> removeEmptyPredicates(List<? extends T> predicates)
T
- the type of the predicatepredicates
- the predicates to checkpublic static <T extends Predicate> com.google.common.collect.ImmutableList<T> removeNotSupportedPredicates(List<? extends T> predicates)
SUPPORTED_PREDICATES
) predicates from the given non-null predicates.T
- the type of the predicatepredicates
- the predicates to checkpublic static boolean containsPredicate(Predicate predicateToCheck, Class<? extends Predicate> predicateClass)
Predicate
class is contained in the given predicate to check.predicateToCheck
- the predicate to checkpredicateClass
- the predicate class to check within the predicate to checkCopyright © 2010 - 2018 edorasware ag. All Rights Reserved.