public final class Predicates extends Object
This class implements basic operations with predicates
Modifier and Type | Field and Description |
---|---|
static Predicate |
EMPTY
An empty predicate.
|
Modifier and Type | Method and Description |
---|---|
static Predicate |
and(List<? extends Predicate> predicates)
Concatenates the given predicates to a combined predicate through a logical AND operator.
|
static Predicate |
and(Predicate one,
Predicate two,
Predicate... more)
Concatenates the given predicates to a combined predicate through a logical AND operator.
|
static Predicate |
getMinimalPredicate(CompositePredicate compositePredicate)
Returns the minimal predicate for the given composite.
|
static Predicate |
not(Predicate predicate)
Negates the given predicate through a NOT operator.
|
static Predicate |
or(List<? extends Predicate> predicates)
Concatenates the given predicates to a combined predicate through a logical OR operator.
|
static Predicate |
or(Predicate one,
Predicate two,
Predicate... more)
Concatenates the given predicates to a combined predicate through a logical OR operator.
|
static String |
surroundWithWildCards(String string)
Surrounds the given string with wildcards for use in
like() predicates. |
public static final Predicate EMPTY
An empty predicate. Behaves as a neutral element which always matches.
public static Predicate and(List<? extends Predicate> predicates)
Concatenates the given predicates to a combined predicate through a logical AND operator.
predicates
- the predicates to and-concatenatepublic static Predicate and(Predicate one, Predicate two, Predicate... more)
Concatenates the given predicates to a combined predicate through a logical AND operator.
one
- the first predicatetwo
- the second predicatemore
- all further predicatespublic static Predicate or(List<? extends Predicate> predicates)
Concatenates the given predicates to a combined predicate through a logical OR operator.
predicates
- the predicates to or-concatenatepublic static Predicate or(Predicate one, Predicate two, Predicate... more)
Concatenates the given predicates to a combined predicate through a logical OR operator.
one
- the first predicatetwo
- the second predicatemore
- all further predicatespublic static Predicate not(Predicate predicate)
Negates the given predicate through a NOT operator.
predicate
- the predicate to be negatedpublic static Predicate getMinimalPredicate(CompositePredicate compositePredicate)
Returns the minimal predicate for the given composite.
compositePredicate
- the composite predicateCopyright © 2010 - 2018 edorasware ag. All Rights Reserved.