A
- the type of the first fact in the tuple.B
- the type of the second fact in the tuple.public interface BiConstraintStream<A,B> extends ConstraintStream
ConstraintStream
that matches two facts.ConstraintStream
Modifier and Type | Method and Description |
---|---|
BiConstraintStream<A,B> |
filter(BiPredicate<A,B> predicate)
Exhaustively test each tuple of facts against the
BiPredicate
and match if BiPredicate.test(Object, Object) returns true. |
<ResultContainer_,Result_> |
groupBy(BiConstraintCollector<A,B,ResultContainer_,Result_> collector)
Runs all tuples of the stream through a given @
BiConstraintCollector and converts them into a new
UniConstraintStream which only has a single tuple, the result of applying BiConstraintCollector . |
<GroupKey_> |
groupBy(BiFunction<A,B,GroupKey_> groupKeyMapping)
Convert the
BiConstraintStream 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(BiFunction<A,B,GroupKey_> groupKeyMapping,
BiConstraintCollector<A,B,ResultContainer_,Result_> collector)
Convert the
BiConstraintStream to a different BiConstraintStream , consisting of unique tuples. |
<GroupKeyA_,GroupKeyB_> |
groupBy(BiFunction<A,B,GroupKeyA_> groupKeyAMapping,
BiFunction<A,B,GroupKeyB_> groupKeyBMapping)
Convert the
BiConstraintStream to a different BiConstraintStream , consisting of unique tuples. |
<GroupKeyA_,GroupKeyB_,ResultContainer_,Result_> |
groupBy(BiFunction<A,B,GroupKeyA_> groupKeyAMapping,
BiFunction<A,B,GroupKeyB_> groupKeyBMapping,
BiConstraintCollector<A,B,ResultContainer_,Result_> collector)
Combines the semantics of
groupBy(BiFunction, BiFunction) and groupBy(BiConstraintCollector) . |
<GroupKeyA_,GroupKeyB_,ResultContainerC_,ResultC_,ResultContainerD_,ResultD_> |
groupBy(BiFunction<A,B,GroupKeyA_> groupKeyAMapping,
BiFunction<A,B,GroupKeyB_> groupKeyBMapping,
BiConstraintCollector<A,B,ResultContainerC_,ResultC_> collectorC,
BiConstraintCollector<A,B,ResultContainerD_,ResultD_> collectorD)
Combines the semantics of
groupBy(BiFunction, BiFunction) and groupBy(BiConstraintCollector) . |
default <C> TriConstraintStream<A,B,C> |
join(Class<C> otherClass)
Create a new
TriConstraintStream for every combination of [A, B] and C. |
default <C> TriConstraintStream<A,B,C> |
join(Class<C> otherClass,
TriJoiner<A,B,C>... joiners)
As defined by
join(Class, TriJoiner) . |
default <C> TriConstraintStream<A,B,C> |
join(Class<C> otherClass,
TriJoiner<A,B,C> joiner)
Create a new
TriConstraintStream for every combination of [A, B] and C for which the TriJoiner
is true (for the properties it extracts from both facts). |
default <C> TriConstraintStream<A,B,C> |
join(Class<C> otherClass,
TriJoiner<A,B,C> joiner1,
TriJoiner<A,B,C> joiner2)
As defined by
join(Class, TriJoiner) . |
default <C> TriConstraintStream<A,B,C> |
join(Class<C> otherClass,
TriJoiner<A,B,C> joiner1,
TriJoiner<A,B,C> joiner2,
TriJoiner<A,B,C> joiner3)
As defined by
join(Class, TriJoiner) . |
default <C> TriConstraintStream<A,B,C> |
join(Class<C> otherClass,
TriJoiner<A,B,C> joiner1,
TriJoiner<A,B,C> joiner2,
TriJoiner<A,B,C> joiner3,
TriJoiner<A,B,C> joiner4)
As defined by
join(Class, TriJoiner) . |
default <C> TriConstraintStream<A,B,C> |
join(UniConstraintStream<C> otherStream)
Create a new
TriConstraintStream for every combination of [A, B] and C. |
<C> TriConstraintStream<A,B,C> |
join(UniConstraintStream<C> otherStream,
TriJoiner<A,B,C> joiner)
Create a new
TriConstraintStream for every combination of [A, B] and C for which the TriJoiner
is true (for the properties it extracts from both facts). |
default Constraint |
penalize(String constraintName,
Score<?> constraintWeight,
ToIntBiFunction<A,B> matchWeigher)
Negatively impact the
Score : subtract the constraintWeight multiplied by the match weight. |
Constraint |
penalize(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
ToIntBiFunction<A,B> matchWeigher)
As defined by
penalize(String, Score, ToIntBiFunction) . |
default Constraint |
penalizeBigDecimal(String constraintName,
Score<?> constraintWeight,
BiFunction<A,B,BigDecimal> matchWeigher)
Negatively impact the
Score : subtract the constraintWeight multiplied by the match weight. |
Constraint |
penalizeBigDecimal(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
BiFunction<A,B,BigDecimal> matchWeigher)
As defined by
penalizeBigDecimal(String, Score, BiFunction) . |
Constraint |
penalizeConfigurable(String constraintPackage,
String constraintName,
ToIntBiFunction<A,B> matchWeigher)
As defined by
penalizeConfigurable(String, ToIntBiFunction) . |
default Constraint |
penalizeConfigurable(String constraintName,
ToIntBiFunction<A,B> matchWeigher)
Negatively impact the
Score : subtract the ConstraintWeight multiplied by the match weight. |
default Constraint |
penalizeConfigurableBigDecimal(String constraintName,
BiFunction<A,B,BigDecimal> matchWeigher)
Negatively impact the
Score : subtract the ConstraintWeight multiplied by the match weight. |
Constraint |
penalizeConfigurableBigDecimal(String constraintPackage,
String constraintName,
BiFunction<A,B,BigDecimal> matchWeigher)
As defined by
penalizeConfigurableBigDecimal(String, BiFunction) . |
Constraint |
penalizeConfigurableLong(String constraintPackage,
String constraintName,
ToLongBiFunction<A,B> matchWeigher)
As defined by
penalizeConfigurableLong(String, ToLongBiFunction) . |
default Constraint |
penalizeConfigurableLong(String constraintName,
ToLongBiFunction<A,B> matchWeigher)
Negatively impact the
Score : subtract the ConstraintWeight multiplied by the match weight. |
default Constraint |
penalizeLong(String constraintName,
Score<?> constraintWeight,
ToLongBiFunction<A,B> matchWeigher)
Negatively impact the
Score : subtract the constraintWeight multiplied by the match weight. |
Constraint |
penalizeLong(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
ToLongBiFunction<A,B> matchWeigher)
As defined by
penalizeLong(String, Score, ToLongBiFunction) . |
default Constraint |
reward(String constraintName,
Score<?> constraintWeight,
ToIntBiFunction<A,B> matchWeigher)
Positively impact the
Score : add the constraintWeight multiplied by the match weight. |
Constraint |
reward(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
ToIntBiFunction<A,B> matchWeigher)
As defined by
reward(String, Score, ToIntBiFunction) . |
default Constraint |
rewardBigDecimal(String constraintName,
Score<?> constraintWeight,
BiFunction<A,B,BigDecimal> matchWeigher)
Positively impact the
Score : add the constraintWeight multiplied by the match weight. |
Constraint |
rewardBigDecimal(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
BiFunction<A,B,BigDecimal> matchWeigher)
As defined by
rewardBigDecimal(String, Score, BiFunction) . |
Constraint |
rewardConfigurable(String constraintPackage,
String constraintName,
ToIntBiFunction<A,B> matchWeigher)
As defined by
rewardConfigurable(String, ToIntBiFunction) . |
default Constraint |
rewardConfigurable(String constraintName,
ToIntBiFunction<A,B> matchWeigher)
Positively impact the
Score : add the ConstraintWeight multiplied by the match weight. |
default Constraint |
rewardConfigurableBigDecimal(String constraintName,
BiFunction<A,B,BigDecimal> matchWeigher)
Positively impact the
Score : add the ConstraintWeight multiplied by the match weight. |
Constraint |
rewardConfigurableBigDecimal(String constraintPackage,
String constraintName,
BiFunction<A,B,BigDecimal> matchWeigher)
As defined by
rewardConfigurableBigDecimal(String, BiFunction) . |
Constraint |
rewardConfigurableLong(String constraintPackage,
String constraintName,
ToLongBiFunction<A,B> matchWeigher)
As defined by
rewardConfigurableLong(String, ToLongBiFunction) . |
default Constraint |
rewardConfigurableLong(String constraintName,
ToLongBiFunction<A,B> matchWeigher)
Positively impact the
Score : add the ConstraintWeight multiplied by the match weight. |
default Constraint |
rewardLong(String constraintName,
Score<?> constraintWeight,
ToLongBiFunction<A,B> matchWeigher)
Positively impact the
Score : add the constraintWeight multiplied by the match weight. |
Constraint |
rewardLong(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
ToLongBiFunction<A,B> matchWeigher)
As defined by
rewardLong(String, Score, ToLongBiFunction) . |
getConstraintFactory, penalize, penalize, penalizeConfigurable, penalizeConfigurable, reward, reward, rewardConfigurable, rewardConfigurable
BiConstraintStream<A,B> filter(BiPredicate<A,B> predicate)
BiPredicate
and match if BiPredicate.test(Object, Object)
returns true.
Important: This is slower and less scalable than UniConstraintStream.join(UniConstraintStream, BiJoiner)
with a proper BiJoiner
predicate (such as Joiners.equal(Function, Function)
,
because the latter applies hashing and/or indexing, so it doesn't create every combination just to filter it out.
predicate
- never nulldefault <C> TriConstraintStream<A,B,C> join(UniConstraintStream<C> otherStream)
TriConstraintStream
for every combination of [A, B] and C.
Important: TriConstraintStream.filter(TriPredicate)
Filtering} this is slower and less scalable
than a join(UniConstraintStream, TriJoiner)
,
because it doesn't apply hashing and/or indexing on the properties,
so it creates and checks every combination of [A, B] and C.
C
- the type of the third matched factotherStream
- never null<C> TriConstraintStream<A,B,C> join(UniConstraintStream<C> otherStream, TriJoiner<A,B,C> joiner)
TriConstraintStream
for every combination of [A, B] and C for which the TriJoiner
is true (for the properties it extracts from both facts).
Important: This is faster and more scalable than a join
followed by a filter
,
because it applies hashing and/or indexing on the properties,
so it doesn't create nor checks every combination of [A, B] and C.
C
- the type of the third matched factotherStream
- never nulljoiner
- never nullTriFunction
is truedefault <C> TriConstraintStream<A,B,C> join(Class<C> otherClass)
TriConstraintStream
for every combination of [A, B] and C.
Important: TriConstraintStream.filter(TriPredicate)
Filtering} this is slower and less scalable
than a join(Class, TriJoiner)
,
because it doesn't apply hashing and/or indexing on the properties,
so it creates and checks every combination of [A, B] and C.
This method is syntactic sugar for join(UniConstraintStream)
.
C
- the type of the third matched factotherClass
- never nulldefault <C> TriConstraintStream<A,B,C> join(Class<C> otherClass, TriJoiner<A,B,C> joiner)
TriConstraintStream
for every combination of [A, B] and C for which the TriJoiner
is true (for the properties it extracts from both facts).
Important: This is faster and more scalable than a join
followed by a filter
,
because it applies hashing and/or indexing on the properties,
so it doesn't create nor checks every combination of [A, B] and C.
This method is syntactic sugar for join(UniConstraintStream, TriJoiner)
.
This method has overloaded methods with multiple TriJoiner
parameters.
C
- the type of the third matched factotherClass
- never nulljoiner
- never nullTriJoiner
is truedefault <C> TriConstraintStream<A,B,C> join(Class<C> otherClass, TriJoiner<A,B,C> joiner1, TriJoiner<A,B,C> joiner2)
join(Class, TriJoiner)
.C
- the type of the third matched factotherClass
- never nulljoiner1
- never nulljoiner2
- never nulljoiners
are truedefault <C> TriConstraintStream<A,B,C> join(Class<C> otherClass, TriJoiner<A,B,C> joiner1, TriJoiner<A,B,C> joiner2, TriJoiner<A,B,C> joiner3)
join(Class, TriJoiner)
.C
- the type of the third matched factotherClass
- never nulljoiner1
- never nulljoiner2
- never nulljoiner3
- never nulljoiners
are truedefault <C> TriConstraintStream<A,B,C> join(Class<C> otherClass, TriJoiner<A,B,C> joiner1, TriJoiner<A,B,C> joiner2, TriJoiner<A,B,C> joiner3, TriJoiner<A,B,C> joiner4)
join(Class, TriJoiner)
.C
- the type of the third matched factotherClass
- never nulljoiner1
- never nulljoiner2
- never nulljoiner3
- never nulljoiner4
- never nulljoiners
are truedefault <C> TriConstraintStream<A,B,C> join(Class<C> otherClass, TriJoiner<A,B,C>... joiners)
join(Class, TriJoiner)
.
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 BiJoiner
parameters.
C
- the type of the third matched factotherClass
- never nulljoiners
- never nulljoiners
are true<ResultContainer_,Result_> UniConstraintStream<Result_> groupBy(BiConstraintCollector<A,B,ResultContainer_,Result_> collector)
BiConstraintCollector
and converts them into a new
UniConstraintStream
which only has a single tuple, the result of applying BiConstraintCollector
.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<GroupKey_> UniConstraintStream<GroupKey_> groupBy(BiFunction<A,B,GroupKey_> groupKeyMapping)
BiConstraintStream
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(BiFunction<A,B,GroupKey_> groupKeyMapping, BiConstraintCollector<A,B,ResultContainer_,Result_> collector)
BiConstraintStream
to a different 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 BiConstraintCollector
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 fact<GroupKeyA_,GroupKeyB_> BiConstraintStream<GroupKeyA_,GroupKeyB_> groupBy(BiFunction<A,B,GroupKeyA_> groupKeyAMapping, BiFunction<A,B,GroupKeyB_> groupKeyBMapping)
BiConstraintStream
to a different 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(BiFunction<A,B,GroupKeyA_> groupKeyAMapping, BiFunction<A,B,GroupKeyB_> groupKeyBMapping, BiConstraintCollector<A,B,ResultContainer_,Result_> collector)
groupBy(BiFunction, BiFunction)
and groupBy(BiConstraintCollector)
.
That is, the first and second facts in the tuple follow the groupBy(BiFunction, BiFunction)
semantics,
and the third fact is the result of applying BiConstraintCollector.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<GroupKeyA_,GroupKeyB_,ResultContainerC_,ResultC_,ResultContainerD_,ResultD_> QuadConstraintStream<GroupKeyA_,GroupKeyB_,ResultC_,ResultD_> groupBy(BiFunction<A,B,GroupKeyA_> groupKeyAMapping, BiFunction<A,B,GroupKeyB_> groupKeyBMapping, BiConstraintCollector<A,B,ResultContainerC_,ResultC_> collectorC, BiConstraintCollector<A,B,ResultContainerD_,ResultD_> collectorD)
groupBy(BiFunction, BiFunction)
and groupBy(BiConstraintCollector)
.
That is, the first and second facts in the tuple follow the groupBy(BiFunction, BiFunction)
semantics.
The third fact is the result of applying the first BiConstraintCollector.finisher()
on all the tuples
of the original BiConstraintStream
that belong to the group.
The fourth fact is the result of applying the second BiConstraintCollector.finisher()
on all the tuples
of the original BiConstraintStream
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 withcollectorD
- never null, the collector to perform the first grouping operation withdefault Constraint penalize(String constraintName, Score<?> constraintWeight, ToIntBiFunction<A,B> 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, ToLongBiFunction)
or
penalizeBigDecimal(String, Score, BiFunction)
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, ToIntBiFunction<A,B> matchWeigher)
penalize(String, Score, ToIntBiFunction)
.constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never nulldefault Constraint penalizeLong(String constraintName, Score<?> constraintWeight, ToLongBiFunction<A,B> 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, ToLongBiFunction<A,B> matchWeigher)
penalizeLong(String, Score, ToLongBiFunction)
.constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never nulldefault Constraint penalizeBigDecimal(String constraintName, Score<?> constraintWeight, BiFunction<A,B,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, BiFunction<A,B,BigDecimal> matchWeigher)
penalizeBigDecimal(String, Score, BiFunction)
.constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never nulldefault Constraint penalizeConfigurable(String constraintName, ToIntBiFunction<A,B> 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, ToLongBiFunction)
or
penalizeConfigurableBigDecimal(String, BiFunction)
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, ToIntBiFunction<A,B> matchWeigher)
penalizeConfigurable(String, ToIntBiFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint penalizeConfigurableLong(String constraintName, ToLongBiFunction<A,B> 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, ToLongBiFunction<A,B> matchWeigher)
penalizeConfigurableLong(String, ToLongBiFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint penalizeConfigurableBigDecimal(String constraintName, BiFunction<A,B,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, BiFunction<A,B,BigDecimal> matchWeigher)
penalizeConfigurableBigDecimal(String, BiFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint reward(String constraintName, Score<?> constraintWeight, ToIntBiFunction<A,B> 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, ToLongBiFunction)
or
rewardBigDecimal(String, Score, BiFunction)
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, ToIntBiFunction<A,B> matchWeigher)
reward(String, Score, ToIntBiFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint rewardLong(String constraintName, Score<?> constraintWeight, ToLongBiFunction<A,B> 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, ToLongBiFunction<A,B> matchWeigher)
rewardLong(String, Score, ToLongBiFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint rewardBigDecimal(String constraintName, Score<?> constraintWeight, BiFunction<A,B,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, BiFunction<A,B,BigDecimal> matchWeigher)
rewardBigDecimal(String, Score, BiFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint rewardConfigurable(String constraintName, ToIntBiFunction<A,B> 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, ToLongBiFunction)
or
rewardConfigurableBigDecimal(String, BiFunction)
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, ToIntBiFunction<A,B> matchWeigher)
rewardConfigurable(String, ToIntBiFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint rewardConfigurableLong(String constraintName, ToLongBiFunction<A,B> 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, ToLongBiFunction<A,B> matchWeigher)
rewardConfigurableLong(String, ToLongBiFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint rewardConfigurableBigDecimal(String constraintName, BiFunction<A,B,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, BiFunction<A,B,BigDecimal> matchWeigher)
rewardConfigurableBigDecimal(String, BiFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nullCopyright © 2006–2020 JBoss by Red Hat. All rights reserved.