Module jpastreamer.field
Interface CombinedPredicate<ENTITY>
- Type Parameters:
ENTITY- the entity type
- All Superinterfaces:
Comparator<ENTITY>,com.speedment.runtime.compute.expression.Expression<ENTITY>,com.speedment.runtime.compute.trait.HasAsDouble<ENTITY>,com.speedment.runtime.compute.trait.HasAsInt<ENTITY>,com.speedment.runtime.compute.trait.HasAsLong<ENTITY>,com.speedment.runtime.compute.trait.HasCompare<ENTITY>,com.speedment.runtime.compute.trait.HasCompose<ENTITY>,com.speedment.runtime.compute.trait.HasHash<ENTITY>,com.speedment.runtime.compute.trait.HasMap<ENTITY,,com.speedment.common.function.BooleanUnaryOperator, com.speedment.runtime.compute.ToBoolean<ENTITY>> com.speedment.runtime.compute.trait.HasMapToDouble<ENTITY,,com.speedment.common.function.BooleanToDoubleFunction> Predicate<ENTITY>,SpeedmentPredicate<ENTITY>,com.speedment.runtime.compute.ToBoolean<ENTITY>,com.speedment.common.function.ToBooleanFunction<ENTITY>
Aggregation of a number of
Predicates of the same type
(e.g. AND or OR) that can be applied in combination.- Author:
- Per Minborg, Emil Forslund
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThis enum list all the different types of combinations -
Method Summary
Modifier and TypeMethodDescriptionstatic <ENTITY> CombinedPredicate<ENTITY>Creates and returns a new CombinedPredicate that is the logical AND combination of the given predicates.static <ENTITY> CombinedPredicate<ENTITY>Creates and returns a new CombinedPredicate that is the logical AND combination of the given predicates.getType()Returns theCombinedPredicate.Typeof this CombinedBasePredicatenegate()static <ENTITY> CombinedPredicate<ENTITY>Creates and returns a new CombinedPredicate that is the logical OR combination of the given predicates.static <ENTITY> CombinedPredicate<ENTITY>Creates or returns a new CombinedPredicate that is the logical OR combination of the given predicates.intsize()Returns the number of predicates that this CombinedBasePredicate holdsstream()Creates and returns a {link Stream} of all predicates that this CombinedPredicate holds.Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongMethods inherited from interface com.speedment.jpastreamer.field.predicate.SpeedmentPredicate
composeMethods inherited from interface com.speedment.runtime.compute.ToBoolean
applyAsBoolean, asDouble, asInt, asLong, compare, composeNullable, expressionType, hash, map, mapToDoubleMethods inherited from interface com.speedment.common.function.ToBooleanFunction
test
-
Method Details
-
stream
Creates and returns a {link Stream} of all predicates that this CombinedPredicate holds.- Returns:
- a {link Stream} of all predicates that this CombinedPredicate holds
-
size
int size()Returns the number of predicates that this CombinedBasePredicate holds- Returns:
- the number of predicates that this CombinedBasePredicate holds
-
getType
CombinedPredicate.Type getType()Returns theCombinedPredicate.Typeof this CombinedBasePredicate- Returns:
- the
CombinedPredicate.Typeof this CombinedBasePredicate
-
and
-
or
-
negate
CombinedPredicate<ENTITY> negate() -
and
static <ENTITY> CombinedPredicate<ENTITY> and(Predicate<ENTITY> first, Predicate<? super ENTITY> second) Creates and returns a new CombinedPredicate that is the logical AND combination of the given predicates.- Type Parameters:
ENTITY- entity type- Parameters:
first- the first predicate used in the AND operationsecond- the first predicate used in the AND operation- Returns:
- a new CombinedPredicate that is the logical AND combination of the given predicates
-
and
Creates and returns a new CombinedPredicate that is the logical AND combination of the given predicates.- Type Parameters:
ENTITY- entity type- Parameters:
predicates- the predicates that make up the AND operation- Returns:
- a new CombinedPredicate that is the logical AND combination of the given predicates
-
or
static <ENTITY> CombinedPredicate<ENTITY> or(Predicate<ENTITY> first, Predicate<? super ENTITY> second) Creates and returns a new CombinedPredicate that is the logical OR combination of the given predicates.- Type Parameters:
ENTITY- entity type- Parameters:
first- the first predicate used in the OR operationsecond- the first predicate used in the OR operation- Returns:
- a new CombinedPredicate that is the logical OR combination of the given predicates
-
or
Creates or returns a new CombinedPredicate that is the logical OR combination of the given predicates.- Type Parameters:
ENTITY- entity type- Parameters:
predicates- the predicates that make up the OR operation- Returns:
- a new CombinedPredicate that is the logical OR combination of the given predicates
-