A
- the type of the first matched fact (either a problem fact or a planning entity
)B
- the type of the second matched fact (either a problem fact or a planning entity
)C
- the type of the third matched fact (either a problem fact or a planning entity
)D
- the type of the fourth matched fact (either a problem fact or a planning entity
)public interface QuadConstraintStream<A,B,C,D> extends ConstraintStream
ConstraintStream
that matches four facts.ConstraintStream
Modifier and Type | Method and Description |
---|---|
QuadConstraintStream<A,B,C,D> |
filter(QuadPredicate<A,B,C,D> predicate)
Exhaustively test each tuple of facts against the
QuadPredicate
and match if QuadPredicate.test(Object, Object, Object, Object) returns true. |
<ResultContainer_,Result_> |
groupBy(QuadConstraintCollector<A,B,C,D,ResultContainer_,Result_> collector)
Convert the
QuadConstraintStream to a UniConstraintStream , containing only a single tuple, the
result of applying QuadConstraintCollector . |
<GroupKey_> |
groupBy(QuadFunction<A,B,C,D,GroupKey_> groupKeyMapping)
Convert the
QuadConstraintStream to a UniConstraintStream , containing the set of tuples resulting
from applying the group key mapping function on all tuples of the original stream. |
<GroupKey_,ResultContainer_,Result_> |
groupBy(QuadFunction<A,B,C,D,GroupKey_> groupKeyMapping,
QuadConstraintCollector<A,B,C,D,ResultContainer_,Result_> collector)
Convert the
QuadConstraintStream to a BiConstraintStream , consisting of unique tuples. |
<GroupKeyA_,GroupKeyB_> |
groupBy(QuadFunction<A,B,C,D,GroupKeyA_> groupKeyAMapping,
QuadFunction<A,B,C,D,GroupKeyB_> groupKeyBMapping)
Convert the
QuadConstraintStream to a BiConstraintStream , consisting of unique tuples. |
<GroupKeyA_,GroupKeyB_,ResultContainer_,Result_> |
groupBy(QuadFunction<A,B,C,D,GroupKeyA_> groupKeyAMapping,
QuadFunction<A,B,C,D,GroupKeyB_> groupKeyBMapping,
QuadConstraintCollector<A,B,C,D,ResultContainer_,Result_> collector)
Combines the semantics of
groupBy(QuadFunction, QuadFunction) and
groupBy(QuadConstraintCollector) . |
<GroupKeyA_,GroupKeyB_,ResultContainerC_,ResultC_,ResultContainerD_,ResultD_> |
groupBy(QuadFunction<A,B,C,D,GroupKeyA_> groupKeyAMapping,
QuadFunction<A,B,C,D,GroupKeyB_> groupKeyBMapping,
QuadConstraintCollector<A,B,C,D,ResultContainerC_,ResultC_> collectorC,
QuadConstraintCollector<A,B,C,D,ResultContainerD_,ResultD_> collectorD)
Combines the semantics of
groupBy(QuadFunction, QuadFunction) and
groupBy(QuadConstraintCollector) . |
<E> QuadConstraintStream<A,B,C,D> |
ifExists(Class<E> otherClass,
PentaJoiner<A,B,C,D,E>... joiners)
As defined by
ifExists(Class, PentaJoiner) . |
default <E> QuadConstraintStream<A,B,C,D> |
ifExists(Class<E> otherClass,
PentaJoiner<A,B,C,D,E> joiner)
Create a new
BiConstraintStream for every tuple of A, B, C and D where E exists for which the
PentaJoiner is true (for the properties it extracts from the facts). |
default <E> QuadConstraintStream<A,B,C,D> |
ifExists(Class<E> otherClass,
PentaJoiner<A,B,C,D,E> joiner1,
PentaJoiner<A,B,C,D,E> joiner2)
As defined by
ifExists(Class, PentaJoiner) . |
default <E> QuadConstraintStream<A,B,C,D> |
ifExists(Class<E> otherClass,
PentaJoiner<A,B,C,D,E> joiner1,
PentaJoiner<A,B,C,D,E> joiner2,
PentaJoiner<A,B,C,D,E> joiner3)
As defined by
ifExists(Class, PentaJoiner) . |
default <E> QuadConstraintStream<A,B,C,D> |
ifExists(Class<E> otherClass,
PentaJoiner<A,B,C,D,E> joiner1,
PentaJoiner<A,B,C,D,E> joiner2,
PentaJoiner<A,B,C,D,E> joiner3,
PentaJoiner<A,B,C,D,E> joiner4)
As defined by
ifExists(Class, PentaJoiner) . |
<E> QuadConstraintStream<A,B,C,D> |
ifNotExists(Class<E> otherClass,
PentaJoiner<A,B,C,D,E>... joiners)
As defined by
ifNotExists(Class, PentaJoiner) . |
default <E> QuadConstraintStream<A,B,C,D> |
ifNotExists(Class<E> otherClass,
PentaJoiner<A,B,C,D,E> joiner)
Create a new
BiConstraintStream for every tuple of A, B, C and D where E does not exist for which the
PentaJoiner is true (for the properties it extracts from the facts). |
default <E> QuadConstraintStream<A,B,C,D> |
ifNotExists(Class<E> otherClass,
PentaJoiner<A,B,C,D,E> joiner1,
PentaJoiner<A,B,C,D,E> joiner2)
As defined by
ifNotExists(Class, PentaJoiner) . |
default <E> QuadConstraintStream<A,B,C,D> |
ifNotExists(Class<E> otherClass,
PentaJoiner<A,B,C,D,E> joiner1,
PentaJoiner<A,B,C,D,E> joiner2,
PentaJoiner<A,B,C,D,E> joiner3)
As defined by
ifNotExists(Class, PentaJoiner) . |
default <E> QuadConstraintStream<A,B,C,D> |
ifNotExists(Class<E> otherClass,
PentaJoiner<A,B,C,D,E> joiner1,
PentaJoiner<A,B,C,D,E> joiner2,
PentaJoiner<A,B,C,D,E> joiner3,
PentaJoiner<A,B,C,D,E> joiner4)
As defined by
ifNotExists(Class, PentaJoiner) . |
default Constraint |
impact(String constraintName,
Score<?> constraintWeight,
ToIntQuadFunction<A,B,C,D> matchWeigher)
Positively or negatively impact the
Score by the constraintWeight multiplied by the match weight. |
Constraint |
impact(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
ToIntQuadFunction<A,B,C,D> matchWeigher)
As defined by
impact(String, Score, ToIntQuadFunction) . |
default Constraint |
impactBigDecimal(String constraintName,
Score<?> constraintWeight,
QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
Positively or negatively impact the
Score by the constraintWeight multiplied by the match weight. |
Constraint |
impactBigDecimal(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
As defined by
impactBigDecimal(String, Score, QuadFunction) . |
Constraint |
impactConfigurable(String constraintPackage,
String constraintName,
ToIntQuadFunction<A,B,C,D> matchWeigher)
As defined by
impactConfigurable(String, ToIntQuadFunction) . |
default Constraint |
impactConfigurable(String constraintName,
ToIntQuadFunction<A,B,C,D> matchWeigher)
Positively or negatively impact the
Score by the ConstraintWeight for each match. |
default Constraint |
impactConfigurableBigDecimal(String constraintName,
QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
Positively or negatively impact the
Score by the ConstraintWeight for each match. |
Constraint |
impactConfigurableBigDecimal(String constraintPackage,
String constraintName,
QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
As defined by
impactConfigurableBigDecimal(String, QuadFunction) . |
Constraint |
impactConfigurableLong(String constraintPackage,
String constraintName,
ToLongQuadFunction<A,B,C,D> matchWeigher)
As defined by
impactConfigurableLong(String, ToLongQuadFunction) . |
default Constraint |
impactConfigurableLong(String constraintName,
ToLongQuadFunction<A,B,C,D> matchWeigher)
Positively or negatively impact the
Score by the ConstraintWeight for each match. |
default Constraint |
impactLong(String constraintName,
Score<?> constraintWeight,
ToLongQuadFunction<A,B,C,D> matchWeigher)
Positively or negatively impact the
Score by the constraintWeight multiplied by the match weight. |
Constraint |
impactLong(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
ToLongQuadFunction<A,B,C,D> matchWeigher)
As defined by
impactLong(String, Score, ToLongQuadFunction) . |
default Constraint |
penalize(String constraintName,
Score<?> constraintWeight,
ToIntQuadFunction<A,B,C,D> matchWeigher)
Negatively impact the
Score : subtract the constraintWeight multiplied by the match weight. |
Constraint |
penalize(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
ToIntQuadFunction<A,B,C,D> matchWeigher)
As defined by
penalize(String, Score, ToIntQuadFunction) . |
default Constraint |
penalizeBigDecimal(String constraintName,
Score<?> constraintWeight,
QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
Negatively impact the
Score : subtract the constraintWeight multiplied by the match weight. |
Constraint |
penalizeBigDecimal(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
As defined by
penalizeBigDecimal(String, Score, QuadFunction) . |
Constraint |
penalizeConfigurable(String constraintPackage,
String constraintName,
ToIntQuadFunction<A,B,C,D> matchWeigher)
As defined by
penalizeConfigurable(String, ToIntQuadFunction) . |
default Constraint |
penalizeConfigurable(String constraintName,
ToIntQuadFunction<A,B,C,D> matchWeigher)
Negatively impact the
Score : subtract the ConstraintWeight multiplied by the match weight. |
default Constraint |
penalizeConfigurableBigDecimal(String constraintName,
QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
Negatively impact the
Score : subtract the ConstraintWeight multiplied by the match weight. |
Constraint |
penalizeConfigurableBigDecimal(String constraintPackage,
String constraintName,
QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
As defined by
penalizeConfigurableBigDecimal(String, QuadFunction) . |
Constraint |
penalizeConfigurableLong(String constraintPackage,
String constraintName,
ToLongQuadFunction<A,B,C,D> matchWeigher)
As defined by
penalizeConfigurableLong(String, ToLongQuadFunction) . |
default Constraint |
penalizeConfigurableLong(String constraintName,
ToLongQuadFunction<A,B,C,D> matchWeigher)
Negatively impact the
Score : subtract the ConstraintWeight multiplied by the match weight. |
default Constraint |
penalizeLong(String constraintName,
Score<?> constraintWeight,
ToLongQuadFunction<A,B,C,D> matchWeigher)
Negatively impact the
Score : subtract the constraintWeight multiplied by the match weight. |
Constraint |
penalizeLong(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
ToLongQuadFunction<A,B,C,D> matchWeigher)
As defined by
penalizeLong(String, Score, ToLongQuadFunction) . |
default Constraint |
reward(String constraintName,
Score<?> constraintWeight,
ToIntQuadFunction<A,B,C,D> matchWeigher)
Positively impact the
Score : add the constraintWeight multiplied by the match weight. |
Constraint |
reward(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
ToIntQuadFunction<A,B,C,D> matchWeigher)
As defined by
reward(String, Score, ToIntQuadFunction) . |
default Constraint |
rewardBigDecimal(String constraintName,
Score<?> constraintWeight,
QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
Positively impact the
Score : add the constraintWeight multiplied by the match weight. |
Constraint |
rewardBigDecimal(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
As defined by
rewardBigDecimal(String, Score, QuadFunction) . |
Constraint |
rewardConfigurable(String constraintPackage,
String constraintName,
ToIntQuadFunction<A,B,C,D> matchWeigher)
As defined by
rewardConfigurable(String, ToIntQuadFunction) . |
default Constraint |
rewardConfigurable(String constraintName,
ToIntQuadFunction<A,B,C,D> matchWeigher)
Positively impact the
Score : add the ConstraintWeight multiplied by the match weight. |
default Constraint |
rewardConfigurableBigDecimal(String constraintName,
QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
Positively impact the
Score : add the ConstraintWeight multiplied by the match weight. |
Constraint |
rewardConfigurableBigDecimal(String constraintPackage,
String constraintName,
QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
As defined by
rewardConfigurableBigDecimal(String, QuadFunction) . |
Constraint |
rewardConfigurableLong(String constraintPackage,
String constraintName,
ToLongQuadFunction<A,B,C,D> matchWeigher)
As defined by
rewardConfigurableLong(String, ToLongQuadFunction) . |
default Constraint |
rewardConfigurableLong(String constraintName,
ToLongQuadFunction<A,B,C,D> matchWeigher)
Positively impact the
Score : add the ConstraintWeight multiplied by the match weight. |
default Constraint |
rewardLong(String constraintName,
Score<?> constraintWeight,
ToLongQuadFunction<A,B,C,D> matchWeigher)
Positively impact the
Score : add the constraintWeight multiplied by the match weight. |
Constraint |
rewardLong(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
ToLongQuadFunction<A,B,C,D> matchWeigher)
As defined by
rewardLong(String, Score, ToLongQuadFunction) . |
getConstraintFactory, impact, impact, penalize, penalize, penalizeConfigurable, penalizeConfigurable, reward, reward, rewardConfigurable, rewardConfigurable
QuadConstraintStream<A,B,C,D> filter(QuadPredicate<A,B,C,D> predicate)
QuadPredicate
and match if QuadPredicate.test(Object, Object, Object, Object)
returns true.
Important: This is slower and less scalable than
TriConstraintStream.join(UniConstraintStream, QuadJoiner)
with a proper QuadJoiner
predicate
(such as Joiners.equal(TriFunction, Function)
,
because the latter applies hashing and/or indexing, so it doesn't create every combination just to filter it out.
predicate
- never nulldefault <E> QuadConstraintStream<A,B,C,D> ifExists(Class<E> otherClass, PentaJoiner<A,B,C,D,E> joiner)
BiConstraintStream
for every tuple of A, B, C and D where E exists for which the
PentaJoiner
is true (for the properties it extracts from the facts).
This method has overloaded methods with multiple PentaJoiner
parameters.
E
- the type of the fifth matched factotherClass
- never nulljoiner
- never nullPentaJoiner
is truedefault <E> QuadConstraintStream<A,B,C,D> ifExists(Class<E> otherClass, PentaJoiner<A,B,C,D,E> joiner1, PentaJoiner<A,B,C,D,E> joiner2)
ifExists(Class, PentaJoiner)
. For performance reasons, indexing joiners must be placed
before filtering joiners.E
- the type of the fifth matched factotherClass
- never nulljoiner1
- never nulljoiner2
- never nullPentaJoiner
s are truedefault <E> QuadConstraintStream<A,B,C,D> ifExists(Class<E> otherClass, PentaJoiner<A,B,C,D,E> joiner1, PentaJoiner<A,B,C,D,E> joiner2, PentaJoiner<A,B,C,D,E> joiner3)
ifExists(Class, PentaJoiner)
. For performance reasons, indexing joiners must be placed
before filtering joiners.E
- the type of the fifth matched factotherClass
- never nulljoiner1
- never nulljoiner2
- never nulljoiner3
- never nullPentaJoiner
s are truedefault <E> QuadConstraintStream<A,B,C,D> ifExists(Class<E> otherClass, PentaJoiner<A,B,C,D,E> joiner1, PentaJoiner<A,B,C,D,E> joiner2, PentaJoiner<A,B,C,D,E> joiner3, PentaJoiner<A,B,C,D,E> joiner4)
ifExists(Class, PentaJoiner)
. For performance reasons, indexing joiners must be placed
before filtering joiners.E
- the type of the fifth matched factotherClass
- never nulljoiner1
- never nulljoiner2
- never nulljoiner3
- never nulljoiner4
- never nullPentaJoiner
s are true<E> QuadConstraintStream<A,B,C,D> ifExists(Class<E> otherClass, PentaJoiner<A,B,C,D,E>... joiners)
ifExists(Class, PentaJoiner)
. For performance reasons, indexing joiners must be placed
before filtering joiners.
This method causes Unchecked generics array creation for varargs parameter warnings,
but we can't fix it with a SafeVarargs
annotation because it's an interface method.
Therefore, there are overloaded methods with up to 4 PentaJoiner
parameters.
E
- the type of the fifth matched factotherClass
- never nulljoiners
- never nullPentaJoiner
s are truedefault <E> QuadConstraintStream<A,B,C,D> ifNotExists(Class<E> otherClass, PentaJoiner<A,B,C,D,E> joiner)
BiConstraintStream
for every tuple of A, B, C and D where E does not exist for which the
PentaJoiner
is true (for the properties it extracts from the facts).
This method has overloaded methods with multiple PentaJoiner
parameters.
E
- the type of the fifth matched factotherClass
- never nulljoiner
- never nullPentaJoiner
is truedefault <E> QuadConstraintStream<A,B,C,D> ifNotExists(Class<E> otherClass, PentaJoiner<A,B,C,D,E> joiner1, PentaJoiner<A,B,C,D,E> joiner2)
ifNotExists(Class, PentaJoiner)
. For performance reasons, indexing joiners must be placed
before filtering joiners.E
- the type of the fifth matched factotherClass
- never nulljoiner1
- never nulljoiner2
- never nullPentaJoiner
s are truedefault <E> QuadConstraintStream<A,B,C,D> ifNotExists(Class<E> otherClass, PentaJoiner<A,B,C,D,E> joiner1, PentaJoiner<A,B,C,D,E> joiner2, PentaJoiner<A,B,C,D,E> joiner3)
ifNotExists(Class, PentaJoiner)
. For performance reasons, indexing joiners must be placed
before filtering joiners.E
- the type of the fifth matched factotherClass
- never nulljoiner1
- never nulljoiner2
- never nulljoiner3
- never nullPentaJoiner
s are truedefault <E> QuadConstraintStream<A,B,C,D> ifNotExists(Class<E> otherClass, PentaJoiner<A,B,C,D,E> joiner1, PentaJoiner<A,B,C,D,E> joiner2, PentaJoiner<A,B,C,D,E> joiner3, PentaJoiner<A,B,C,D,E> joiner4)
ifNotExists(Class, PentaJoiner)
. For performance reasons, indexing joiners must be placed
before filtering joiners.E
- the type of the fifth matched factotherClass
- never nulljoiner1
- never nulljoiner2
- never nulljoiner3
- never nulljoiner4
- never nullPentaJoiner
s are true<E> QuadConstraintStream<A,B,C,D> ifNotExists(Class<E> otherClass, PentaJoiner<A,B,C,D,E>... joiners)
ifNotExists(Class, PentaJoiner)
. For performance reasons, indexing joiners must be placed
before filtering joiners.
This method causes Unchecked generics array creation for varargs parameter warnings,
but we can't fix it with a SafeVarargs
annotation because it's an interface method.
Therefore, there are overloaded methods with up to 4 PentaJoiner
parameters.
E
- the type of the fifth matched factotherClass
- never nulljoiners
- never nullPentaJoiner
s are true<ResultContainer_,Result_> UniConstraintStream<Result_> groupBy(QuadConstraintCollector<A,B,C,D,ResultContainer_,Result_> collector)
QuadConstraintStream
to a UniConstraintStream
, containing only a single tuple, the
result of applying QuadConstraintCollector
.
UniConstraintStream
which only has a single tuple, the result of applying
QuadConstraintCollector
.ResultContainer_
- the mutable accumulation type (often hidden as an implementation detail)Result_
- the type of a fact in the destination UniConstraintStream
's tuplecollector
- never null, the collector to perform the grouping operation with
See ConstraintCollectors
for common operations, such as count()
, sum()
and others.<GroupKey_> UniConstraintStream<GroupKey_> groupBy(QuadFunction<A,B,C,D,GroupKey_> groupKeyMapping)
QuadConstraintStream
to a UniConstraintStream
, containing the set of tuples resulting
from applying the group key mapping function on all tuples of the original stream.
Neither tuple of the new stream Objects.equals(Object, Object)
any other.GroupKey_
- the type of a fact in the destination UniConstraintStream
's tuplegroupKeyMapping
- never null, mapping function to convert each element in the stream to a different element<GroupKey_,ResultContainer_,Result_> BiConstraintStream<GroupKey_,Result_> groupBy(QuadFunction<A,B,C,D,GroupKey_> groupKeyMapping, QuadConstraintCollector<A,B,C,D,ResultContainer_,Result_> collector)
QuadConstraintStream
to a BiConstraintStream
, consisting of unique tuples.
The first fact is the return value of the first group key mapping function, applied on the incoming tuple.
The second fact is the return value of a given QuadConstraintCollector
applied on all incoming tuples
with the same first fact.
GroupKey_
- the type of the first fact in the destination BiConstraintStream
's tupleResultContainer_
- the mutable accumulation type (often hidden as an implementation detail)Result_
- the type of the second fact in the destination BiConstraintStream
's tuplegroupKeyMapping
- never null, function to convert the fact in the original tuple to a different factcollector
- never null, the collector to perform the grouping operation with
See ConstraintCollectors
for common operations, such as count()
, sum()
and others.<GroupKeyA_,GroupKeyB_> BiConstraintStream<GroupKeyA_,GroupKeyB_> groupBy(QuadFunction<A,B,C,D,GroupKeyA_> groupKeyAMapping, QuadFunction<A,B,C,D,GroupKeyB_> groupKeyBMapping)
QuadConstraintStream
to a BiConstraintStream
, consisting of unique tuples.
The first fact is the return value of the first group key mapping function, applied on the incoming tuple. The second fact is the return value of the second group key mapping function, applied on all incoming tuples with the same first fact.
GroupKeyA_
- the type of the first fact in the destination BiConstraintStream
's tupleGroupKeyB_
- the type of the second fact in the destination BiConstraintStream
's tuplegroupKeyAMapping
- never null, function to convert the facts in the original tuple to a new factgroupKeyBMapping
- never null, function to convert the facts in the original tuple to another new fact<GroupKeyA_,GroupKeyB_,ResultContainer_,Result_> TriConstraintStream<GroupKeyA_,GroupKeyB_,Result_> groupBy(QuadFunction<A,B,C,D,GroupKeyA_> groupKeyAMapping, QuadFunction<A,B,C,D,GroupKeyB_> groupKeyBMapping, QuadConstraintCollector<A,B,C,D,ResultContainer_,Result_> collector)
groupBy(QuadFunction, QuadFunction)
and
groupBy(QuadConstraintCollector)
.
That is, the first and second facts in the tuple follow the groupBy(QuadFunction, QuadFunction)
semantics,
and the third fact is the result of applying QuadConstraintCollector.finisher()
on all the tuples of the
original UniConstraintStream
that belong to the group.GroupKeyA_
- the type of the first fact in the destination TriConstraintStream
's tupleGroupKeyB_
- the type of the second fact in the destination TriConstraintStream
's tupleResultContainer_
- the mutable accumulation type (often hidden as an implementation detail)Result_
- the type of the third fact in the destination TriConstraintStream
's tuplegroupKeyAMapping
- never null, function to convert the original tuple into a first factgroupKeyBMapping
- never null, function to convert the original tuple into a second factcollector
- never null, the collector to perform the grouping operation with
See ConstraintCollectors
for common operations, such as count()
, sum()
and others.<GroupKeyA_,GroupKeyB_,ResultContainerC_,ResultC_,ResultContainerD_,ResultD_> QuadConstraintStream<GroupKeyA_,GroupKeyB_,ResultC_,ResultD_> groupBy(QuadFunction<A,B,C,D,GroupKeyA_> groupKeyAMapping, QuadFunction<A,B,C,D,GroupKeyB_> groupKeyBMapping, QuadConstraintCollector<A,B,C,D,ResultContainerC_,ResultC_> collectorC, QuadConstraintCollector<A,B,C,D,ResultContainerD_,ResultD_> collectorD)
groupBy(QuadFunction, QuadFunction)
and
groupBy(QuadConstraintCollector)
.
That is, the first and second facts in the tuple follow the groupBy(QuadFunction, QuadFunction)
semantics.
The third fact is the result of applying the first QuadConstraintCollector.finisher()
on all the tuples
of the original QuadConstraintStream
that belong to the group.
The fourth fact is the result of applying the second QuadConstraintCollector.finisher()
on all the tuples
of the original QuadConstraintStream
that belong to the groupGroupKeyA_
- the type of the first fact in the destination QuadConstraintStream
's tupleGroupKeyB_
- the type of the second fact in the destination QuadConstraintStream
's tupleResultContainerC_
- the mutable accumulation type (often hidden as an implementation detail)ResultC_
- the type of the third fact in the destination QuadConstraintStream
's tupleResultContainerD_
- the mutable accumulation type (often hidden as an implementation detail)ResultD_
- the type of the fourth fact in the destination QuadConstraintStream
's tuplegroupKeyAMapping
- never null, function to convert the original tuple into a first factgroupKeyBMapping
- never null, function to convert the original tuple into a second factcollectorC
- never null, the collector to perform the first grouping operation with
See ConstraintCollectors
for common operations, such as count()
, sum()
and others.collectorD
- never null, the collector to perform the second grouping operation with
See ConstraintCollectors
for common operations, such as count()
, sum()
and others.default Constraint penalize(String constraintName, Score<?> constraintWeight, ToIntQuadFunction<A,B,C,D> matchWeigher)
Score
: subtract the constraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.penalize(String, Score)
.
For non-int Score
types use penalizeLong(String, Score, ToLongQuadFunction)
or
penalizeBigDecimal(String, Score, QuadFunction)
instead.
constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationconstraintWeight
- never nullmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint penalize(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntQuadFunction<A,B,C,D> matchWeigher)
penalize(String, Score, ToIntQuadFunction)
.constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never nulldefault Constraint penalizeLong(String constraintName, Score<?> constraintWeight, ToLongQuadFunction<A,B,C,D> matchWeigher)
Score
: subtract the constraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.penalize(String, Score)
.constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationconstraintWeight
- never nullmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint penalizeLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongQuadFunction<A,B,C,D> matchWeigher)
penalizeLong(String, Score, ToLongQuadFunction)
.constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never nulldefault Constraint penalizeBigDecimal(String constraintName, Score<?> constraintWeight, QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
Score
: subtract the constraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.penalize(String, Score)
.constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationconstraintWeight
- never nullmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint penalizeBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
penalizeBigDecimal(String, Score, QuadFunction)
.constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never nulldefault Constraint penalizeConfigurable(String constraintName, ToIntQuadFunction<A,B,C,D> matchWeigher)
Score
: subtract the ConstraintWeight
multiplied by the match weight.
Otherwise as defined by ConstraintStream.penalizeConfigurable(String)
.
For non-int Score
types use penalizeConfigurableLong(String, ToLongQuadFunction)
or
penalizeConfigurableBigDecimal(String, QuadFunction)
instead.
constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint penalizeConfigurable(String constraintPackage, String constraintName, ToIntQuadFunction<A,B,C,D> matchWeigher)
penalizeConfigurable(String, ToIntQuadFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint penalizeConfigurableLong(String constraintName, ToLongQuadFunction<A,B,C,D> matchWeigher)
Score
: subtract the ConstraintWeight
multiplied by the match weight.
Otherwise as defined by ConstraintStream.penalizeConfigurable(String)
.constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint penalizeConfigurableLong(String constraintPackage, String constraintName, ToLongQuadFunction<A,B,C,D> matchWeigher)
penalizeConfigurableLong(String, ToLongQuadFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint penalizeConfigurableBigDecimal(String constraintName, QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
Score
: subtract the ConstraintWeight
multiplied by the match weight.
Otherwise as defined by ConstraintStream.penalizeConfigurable(String)
.constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint penalizeConfigurableBigDecimal(String constraintPackage, String constraintName, QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
penalizeConfigurableBigDecimal(String, QuadFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint reward(String constraintName, Score<?> constraintWeight, ToIntQuadFunction<A,B,C,D> matchWeigher)
Score
: add the constraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.reward(String, Score)
.
For non-int Score
types use rewardLong(String, Score, ToLongQuadFunction)
or
rewardBigDecimal(String, Score, QuadFunction)
instead.
constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationconstraintWeight
- never nullmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint reward(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntQuadFunction<A,B,C,D> matchWeigher)
reward(String, Score, ToIntQuadFunction)
.constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never nulldefault Constraint rewardLong(String constraintName, Score<?> constraintWeight, ToLongQuadFunction<A,B,C,D> matchWeigher)
Score
: add the constraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.reward(String, Score)
.constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationconstraintWeight
- never nullmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint rewardLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongQuadFunction<A,B,C,D> matchWeigher)
rewardLong(String, Score, ToLongQuadFunction)
.constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never nulldefault Constraint rewardBigDecimal(String constraintName, Score<?> constraintWeight, QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
Score
: add the constraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.reward(String, Score)
.constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationconstraintWeight
- never nullmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint rewardBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
rewardBigDecimal(String, Score, QuadFunction)
.constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never nulldefault Constraint rewardConfigurable(String constraintName, ToIntQuadFunction<A,B,C,D> matchWeigher)
Score
: add the ConstraintWeight
multiplied by the match weight.
Otherwise as defined by ConstraintStream.rewardConfigurable(String)
.
For non-int Score
types use rewardConfigurableLong(String, ToLongQuadFunction)
or
rewardConfigurableBigDecimal(String, QuadFunction)
instead.
constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint rewardConfigurable(String constraintPackage, String constraintName, ToIntQuadFunction<A,B,C,D> matchWeigher)
rewardConfigurable(String, ToIntQuadFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint rewardConfigurableLong(String constraintName, ToLongQuadFunction<A,B,C,D> matchWeigher)
Score
: add the ConstraintWeight
multiplied by the match weight.
Otherwise as defined by ConstraintStream.rewardConfigurable(String)
.constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint rewardConfigurableLong(String constraintPackage, String constraintName, ToLongQuadFunction<A,B,C,D> matchWeigher)
rewardConfigurableLong(String, ToLongQuadFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint rewardConfigurableBigDecimal(String constraintName, QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
Score
: add the ConstraintWeight
multiplied by the match weight.
Otherwise as defined by ConstraintStream.rewardConfigurable(String)
.constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint rewardConfigurableBigDecimal(String constraintPackage, String constraintName, QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
rewardConfigurableBigDecimal(String, QuadFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint impact(String constraintName, Score<?> constraintWeight, ToIntQuadFunction<A,B,C,D> matchWeigher)
Score
by the constraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.impact(String, Score)
.
Use penalize(...)
or reward(...)
instead, unless this constraint can both have positive and
negative weights.
For non-int Score
types use impactLong(String, Score, ToLongQuadFunction)
or
impactBigDecimal(String, Score, QuadFunction)
instead.
constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationconstraintWeight
- never nullmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint impact(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntQuadFunction<A,B,C,D> matchWeigher)
impact(String, Score, ToIntQuadFunction)
.constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never nulldefault Constraint impactLong(String constraintName, Score<?> constraintWeight, ToLongQuadFunction<A,B,C,D> matchWeigher)
Score
by the constraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.impact(String, Score)
.
Use penalizeLong(...)
or rewardLong(...)
instead, unless this constraint can both have positive
and negative weights.
constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationconstraintWeight
- never nullmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint impactLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongQuadFunction<A,B,C,D> matchWeigher)
impactLong(String, Score, ToLongQuadFunction)
.constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never nulldefault Constraint impactBigDecimal(String constraintName, Score<?> constraintWeight, QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
Score
by the constraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.impact(String, Score)
.
Use penalizeBigDecimal(...)
or rewardBigDecimal(...)
instead, unless this constraint can both
have positive and negative weights.
constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationconstraintWeight
- never nullmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint impactBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
impactBigDecimal(String, Score, QuadFunction)
.constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never nulldefault Constraint impactConfigurable(String constraintName, ToIntQuadFunction<A,B,C,D> matchWeigher)
Score
by the ConstraintWeight
for each match.
Use penalizeConfigurable(...)
or rewardConfigurable(...)
instead, unless this constraint can both
have positive and negative weights.
For non-int Score
types use impactConfigurableLong(String, ToLongQuadFunction)
or
impactConfigurableBigDecimal(String, QuadFunction)
instead.
The constraintWeight comes from an ConstraintWeight
annotated member on the
ConstraintConfiguration
, so end users can change the constraint weights dynamically.
This constraint may be deactivated if the ConstraintWeight
is zero.
If there is no ConstraintConfiguration
, use ConstraintStream.impact(String, Score)
instead.
The Constraint.getConstraintPackage()
defaults to ConstraintConfiguration.constraintPackage()
.
constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint impactConfigurable(String constraintPackage, String constraintName, ToIntQuadFunction<A,B,C,D> matchWeigher)
impactConfigurable(String, ToIntQuadFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint impactConfigurableLong(String constraintName, ToLongQuadFunction<A,B,C,D> matchWeigher)
Score
by the ConstraintWeight
for each match.
Use penalizeConfigurableLong(...)
or rewardConfigurableLong(...)
instead, unless this constraint
can both have positive and negative weights.
The constraintWeight comes from an ConstraintWeight
annotated member on the
ConstraintConfiguration
, so end users can change the constraint weights dynamically.
This constraint may be deactivated if the ConstraintWeight
is zero.
If there is no ConstraintConfiguration
, use ConstraintStream.impact(String, Score)
instead.
The Constraint.getConstraintPackage()
defaults to ConstraintConfiguration.constraintPackage()
.
constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint impactConfigurableLong(String constraintPackage, String constraintName, ToLongQuadFunction<A,B,C,D> matchWeigher)
impactConfigurableLong(String, ToLongQuadFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint impactConfigurableBigDecimal(String constraintName, QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
Score
by the ConstraintWeight
for each match.
Use penalizeConfigurableBigDecimal(...)
or rewardConfigurableBigDecimal(...)
instead, unless this
constraint can both have positive and negative weights.
The constraintWeight comes from an ConstraintWeight
annotated member on the
ConstraintConfiguration
, so end users can change the constraint weights dynamically.
This constraint may be deactivated if the ConstraintWeight
is zero.
If there is no ConstraintConfiguration
, use ConstraintStream.impact(String, Score)
instead.
The Constraint.getConstraintPackage()
defaults to ConstraintConfiguration.constraintPackage()
.
constraintName
- never null, shows up in ConstraintMatchTotal
during score justificationmatchWeigher
- never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint impactConfigurableBigDecimal(String constraintPackage, String constraintName, QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
impactConfigurableBigDecimal(String, QuadFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nullCopyright © 2006–2021 JBoss by Red Hat. All rights reserved.