Interface InnerBiConstraintStream<A,B>
- All Superinterfaces:
BiConstraintStream<A,,B> ConstraintStream
- All Known Implementing Classes:
BavetAbstractBiConstraintStream,BavetAftBridgeBiConstraintStream,BavetBiConcatBiConstraintStream,BavetForeBridgeBiConstraintStream,BavetJoinBiConstraintStream,BavetUniConcatBiConstraintStream
-
Method Summary
Modifier and TypeMethodDescriptionstatic <A,B> BiFunction<A, B, Collection<?>> static <A,B> TriFunction<A, B, Score<?>, DefaultConstraintJustification> default @NonNull BiConstraintStream<A,B> distinct()Transforms the stream in such a way that all the tuples going through it are distinct.booleanThis method will return true if the constraint stream is guaranteed to only produce distinct tuples.default <C> @NonNull BiConstraintStream<A,B> As defined byBiConstraintStream.ifExists(Class, TriJoiner).default <C> @NonNull BiConstraintStream<A,B> ifExistsIncludingUnassigned(@NonNull Class<C> otherClass, @NonNull TriJoiner<A, B, C> @NonNull ... joiners) default <C> @NonNull BiConstraintStream<A,B> ifNotExists(@NonNull Class<C> otherClass, @NonNull TriJoiner<A, B, C>... joiners) As defined byBiConstraintStream.ifNotExists(Class, TriJoiner).default <C> @NonNull BiConstraintStream<A,B> ifNotExistsIncludingUnassigned(@NonNull Class<C> otherClass, @NonNull TriJoiner<A, B, C>... joiners) default @NonNull ConstraintPositively or negatively impact theScoreby the constraintWeight for each match.default @NonNull Constraintimpact(@NonNull String constraintPackage, @NonNull String constraintName, @NonNull Score<?> constraintWeight) As defined byConstraintStream.impact(String, Score).default <Score_ extends Score<Score_>>
@NonNull BiConstraintBuilder<A,B, Score_> impact(@NonNull Score_ constraintWeight, @NonNull ToIntBiFunction<A, B> matchWeigher) Positively or negatively impacts theScoreby constraintWeight multiplied by matchWeight for each match and returns a builder to apply optional constraint properties.default <Score_ extends Score<Score_>>
@NonNull BiConstraintBuilder<A,B, Score_> impactBigDecimal(@NonNull Score_ constraintWeight, @NonNull BiFunction<A, B, BigDecimal> matchWeigher) As defined byBiConstraintStream.impact(Score, ToIntBiFunction), with an impact of typeBigDecimal.default BiConstraintBuilder<A,B, ?> impactConfigurable(ToIntBiFunction<A, B> matchWeigher) Positively impacts theScoreby theConstraintWeightmultiplied by match weight for each match, and returns a builder to apply optional constraint properties.default BiConstraintBuilder<A,B, ?> impactConfigurableBigDecimal(BiFunction<A, B, BigDecimal> matchWeigher) As defined byBiConstraintStream.impactConfigurable(ToIntBiFunction), with an impact of type BigDecimal.default BiConstraintBuilder<A,B, ?> impactConfigurableLong(ToLongBiFunction<A, B> matchWeigher) As defined byBiConstraintStream.impactConfigurable(ToIntBiFunction), with an impact of type long.default <Score_ extends Score<Score_>>
@NonNull BiConstraintBuilder<A,B, Score_> impactLong(@NonNull Score_ constraintWeight, @NonNull ToLongBiFunction<A, B> matchWeigher) As defined byBiConstraintStream.impact(Score, ToIntBiFunction), with an impact of type long.<Score_ extends Score<Score_>>
BiConstraintBuilder<A,B, Score_> innerImpact(Score_ constraintWeight, BiFunction<A, B, BigDecimal> matchWeigher, ScoreImpactType scoreImpactType) <Score_ extends Score<Score_>>
BiConstraintBuilder<A,B, Score_> innerImpact(Score_ constraintWeight, ToIntBiFunction<A, B> matchWeigher, ScoreImpactType scoreImpactType) <Score_ extends Score<Score_>>
BiConstraintBuilder<A,B, Score_> innerImpact(Score_ constraintWeight, ToLongBiFunction<A, B> matchWeigher, ScoreImpactType scoreImpactType) default <C> @NonNull TriConstraintStream<A,B, C> As defined byBiConstraintStream.join(Class, TriJoiner).default @NonNull ConstraintNegatively impact theScore: subtract the constraintWeight for each match.default @NonNull Constraintpenalize(@NonNull String constraintPackage, @NonNull String constraintName, @NonNull Score<?> constraintWeight) As defined byConstraintStream.penalize(String, Score).default <Score_ extends Score<Score_>>
@NonNull BiConstraintBuilder<A,B, Score_> penalize(@NonNull Score_ constraintWeight, @NonNull ToIntBiFunction<A, B> matchWeigher) Applies a negativeScoreimpact, subtracting the constraintWeight multiplied by the match weight, and returns a builder to apply optional constraint properties.default <Score_ extends Score<Score_>>
@NonNull BiConstraintBuilder<A,B, Score_> penalizeBigDecimal(@NonNull Score_ constraintWeight, @NonNull BiFunction<A, B, BigDecimal> matchWeigher) As defined byBiConstraintStream.penalize(Score, ToIntBiFunction), with a penalty of typeBigDecimal.default @NonNull ConstraintpenalizeConfigurable(@NonNull String constraintName) Negatively impact theScore: subtract theConstraintWeightfor each match.default @NonNull ConstraintpenalizeConfigurable(@NonNull String constraintPackage, @NonNull String constraintName) As defined byConstraintStream.penalizeConfigurable(String).default BiConstraintBuilder<A,B, ?> penalizeConfigurable(ToIntBiFunction<A, B> matchWeigher) Negatively impacts theScore, subtracting theConstraintWeightmultiplied by match weight for each match, and returns a builder to apply optional constraint properties.default BiConstraintBuilder<A,B, ?> penalizeConfigurableBigDecimal(BiFunction<A, B, BigDecimal> matchWeigher) As defined byBiConstraintStream.penalizeConfigurable(ToIntBiFunction), with a penalty of typeBigDecimal.default BiConstraintBuilder<A,B, ?> penalizeConfigurableLong(ToLongBiFunction<A, B> matchWeigher) As defined byBiConstraintStream.penalizeConfigurable(ToIntBiFunction), with a penalty of type long.default <Score_ extends Score<Score_>>
@NonNull BiConstraintBuilder<A,B, Score_> penalizeLong(@NonNull Score_ constraintWeight, @NonNull ToLongBiFunction<A, B> matchWeigher) As defined byBiConstraintStream.penalize(Score, ToIntBiFunction), with a penalty of type long.default @NonNull ConstraintPositively impact theScore: add the constraintWeight for each match.default @NonNull Constraintreward(@NonNull String constraintPackage, @NonNull String constraintName, @NonNull Score<?> constraintWeight) As defined byConstraintStream.reward(String, Score).default <Score_ extends Score<Score_>>
@NonNull BiConstraintBuilder<A,B, Score_> reward(@NonNull Score_ constraintWeight, @NonNull ToIntBiFunction<A, B> matchWeigher) Applies a positiveScoreimpact, adding the constraintWeight multiplied by the match weight, and returns a builder to apply optional constraint properties.default <Score_ extends Score<Score_>>
@NonNull BiConstraintBuilder<A,B, Score_> rewardBigDecimal(@NonNull Score_ constraintWeight, @NonNull BiFunction<A, B, BigDecimal> matchWeigher) As defined byBiConstraintStream.reward(Score, ToIntBiFunction), with a penalty of typeBigDecimal.default @NonNull ConstraintrewardConfigurable(@NonNull String constraintName) Positively impact theScore: add theConstraintWeightfor each match.default @NonNull ConstraintrewardConfigurable(@NonNull String constraintPackage, @NonNull String constraintName) As defined byConstraintStream.rewardConfigurable(String).default BiConstraintBuilder<A,B, ?> rewardConfigurable(ToIntBiFunction<A, B> matchWeigher) Positively impacts theScore, adding theConstraintWeightmultiplied by match weight for each match, and returns a builder to apply optional constraint properties.default BiConstraintBuilder<A,B, ?> rewardConfigurableBigDecimal(BiFunction<A, B, BigDecimal> matchWeigher) As defined byBiConstraintStream.rewardConfigurable(ToIntBiFunction), with a penalty of typeBigDecimal.default BiConstraintBuilder<A,B, ?> rewardConfigurableLong(ToLongBiFunction<A, B> matchWeigher) As defined byBiConstraintStream.rewardConfigurable(ToIntBiFunction), with a penalty of type long.default <Score_ extends Score<Score_>>
@NonNull BiConstraintBuilder<A,B, Score_> rewardLong(@NonNull Score_ constraintWeight, @NonNull ToLongBiFunction<A, B> matchWeigher) As defined byBiConstraintStream.reward(Score, ToIntBiFunction), with a penalty of type long.Methods inherited from interface ai.timefold.solver.core.api.score.stream.bi.BiConstraintStream
complement, complement, concat, concat, concat, concat, concat, concat, concat, expand, expand, filter, flattenLast, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, ifExists, ifExists, ifExists, ifExists, ifExists, ifExists, ifExists, ifExists, ifExists, ifExistsIncludingNullVars, ifExistsIncludingNullVars, ifExistsIncludingNullVars, ifExistsIncludingNullVars, ifExistsIncludingNullVars, ifExistsIncludingUnassigned, ifExistsIncludingUnassigned, ifExistsIncludingUnassigned, ifExistsIncludingUnassigned, ifNotExists, ifNotExists, ifNotExists, ifNotExists, ifNotExists, ifNotExists, ifNotExists, ifNotExists, ifNotExists, ifNotExistsIncludingNullVars, ifNotExistsIncludingNullVars, ifNotExistsIncludingNullVars, ifNotExistsIncludingNullVars, ifNotExistsIncludingNullVars, ifNotExistsIncludingUnassigned, ifNotExistsIncludingUnassigned, ifNotExistsIncludingUnassigned, ifNotExistsIncludingUnassigned, impact, impact, impact, impactBigDecimal, impactBigDecimal, impactConfigurable, impactConfigurable, impactConfigurable, impactConfigurableBigDecimal, impactConfigurableBigDecimal, impactConfigurableLong, impactConfigurableLong, impactLong, impactLong, join, join, join, join, join, join, join, join, join, join, join, map, map, map, map, penalize, penalize, penalize, penalizeBigDecimal, penalizeBigDecimal, penalizeBigDecimal, penalizeConfigurable, penalizeConfigurable, penalizeConfigurable, penalizeConfigurableBigDecimal, penalizeConfigurableBigDecimal, penalizeConfigurableLong, penalizeConfigurableLong, penalizeLong, penalizeLong, penalizeLong, reward, reward, reward, rewardBigDecimal, rewardBigDecimal, rewardConfigurable, rewardConfigurable, rewardConfigurable, rewardConfigurableBigDecimal, rewardConfigurableBigDecimal, rewardConfigurableLong, rewardConfigurableLong, rewardLong, rewardLongMethods inherited from interface ai.timefold.solver.core.api.score.stream.ConstraintStream
getConstraintFactory
-
Method Details
-
createDefaultJustificationMapping
static <A,B> TriFunction<A,B, createDefaultJustificationMapping()Score<?>, DefaultConstraintJustification> -
createDefaultIndictedObjectsMapping
-
getRetrievalSemantics
RetrievalSemantics getRetrievalSemantics() -
guaranteesDistinct
boolean guaranteesDistinct()This method will return true if the constraint stream is guaranteed to only produce distinct tuples. Seedistinct()for details.- Returns:
- true if the guarantee of distinct tuples is provided
-
join
default <C> @NonNull TriConstraintStream<A,B, joinC> (@NonNull Class<C> otherClass, TriJoiner<A, B, C>... joiners) Description copied from interface:BiConstraintStreamAs defined byBiConstraintStream.join(Class, TriJoiner). 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
SafeVarargsannotation because it's an interface method. Therefore, there are overloaded methods with up to 4BiJoinerparameters.- Specified by:
joinin interfaceBiConstraintStream<A,B> - Type Parameters:
C- the type of the third matched fact- Returns:
- a stream that matches every combination of [A, B] and C for which all the
joinersare true
-
ifExists
default <C> @NonNull BiConstraintStream<A,B> ifExists(@NonNull Class<C> otherClass, TriJoiner<A, B, C> @NonNull ... joiners) Description copied from interface:BiConstraintStreamAs defined byBiConstraintStream.ifExists(Class, TriJoiner). 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
SafeVarargsannotation because it's an interface method. Therefore, there are overloaded methods with up to 4TriJoinerparameters.- Specified by:
ifExistsin interfaceBiConstraintStream<A,B> - Type Parameters:
C- the type of the third matched fact- Returns:
- a stream that matches every pair of A and B where C exists for which the
TriJoiners are true
-
ifExistsIncludingUnassigned
default <C> @NonNull BiConstraintStream<A,B> ifExistsIncludingUnassigned(@NonNull Class<C> otherClass, @NonNull TriJoiner<A, B, C> @NonNull ... joiners) Description copied from interface:BiConstraintStreamAs defined byBiConstraintStream.ifExistsIncludingUnassigned(Class, TriJoiner). 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
SafeVarargsannotation because it's an interface method. Therefore, there are overloaded methods with up to 4TriJoinerparameters.- Specified by:
ifExistsIncludingUnassignedin interfaceBiConstraintStream<A,B> - Type Parameters:
C- the type of the third matched fact- Returns:
- a stream that matches every pair of A and B where C exists for which the
TriJoiners are true
-
ifNotExists
default <C> @NonNull BiConstraintStream<A,B> ifNotExists(@NonNull Class<C> otherClass, @NonNull TriJoiner<A, B, C>... joiners) Description copied from interface:BiConstraintStreamAs defined byBiConstraintStream.ifNotExists(Class, TriJoiner). 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
SafeVarargsannotation because it's an interface method. Therefore, there are overloaded methods with up to 4TriJoinerparameters.- Specified by:
ifNotExistsin interfaceBiConstraintStream<A,B> - Type Parameters:
C- the type of the third matched fact- Returns:
- a stream that matches every pair of A and B where C does not exist for which the
TriJoiners are true
-
ifNotExistsIncludingUnassigned
default <C> @NonNull BiConstraintStream<A,B> ifNotExistsIncludingUnassigned(@NonNull Class<C> otherClass, @NonNull TriJoiner<A, B, C>... joiners) Description copied from interface:BiConstraintStreamAs defined byBiConstraintStream.ifNotExistsIncludingUnassigned(Class, TriJoiner). 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
SafeVarargsannotation because it's an interface method. Therefore, there are overloaded methods with up to 4TriJoinerparameters.- Specified by:
ifNotExistsIncludingUnassignedin interfaceBiConstraintStream<A,B> - Type Parameters:
C- the type of the third matched fact- Returns:
- a stream that matches every pair of A and B where C does not exist for which the
TriJoiners are true
-
distinct
Description copied from interface:BiConstraintStreamTransforms the stream in such a way that all the tuples going through it are distinct. (No two result tuples areequal.)By default, tuples going through a constraint stream are distinct. However, operations such as
BiConstraintStream.map(BiFunction)may create a stream which breaks that promise. By calling this method on such a stream, duplicate copies of the same tuple are omitted at a performance cost.- Specified by:
distinctin interfaceBiConstraintStream<A,B>
-
penalize
default <Score_ extends Score<Score_>> @NonNull BiConstraintBuilder<A,B, penalizeScore_> (@NonNull Score_ constraintWeight, @NonNull ToIntBiFunction<A, B> matchWeigher) Description copied from interface:BiConstraintStreamApplies a negativeScoreimpact, subtracting the constraintWeight multiplied by the match weight, and returns a builder to apply optional constraint properties.The constraintWeight specified here can be overridden using
ConstraintWeightOverrideson thePlanningSolution-annotated classFor non-int
Scoretypes useBiConstraintStream.penalizeLong(Score, ToLongBiFunction)orBiConstraintStream.penalizeBigDecimal(Score, BiFunction)instead.- Specified by:
penalizein interfaceBiConstraintStream<A,B> matchWeigher- the result of this function (matchWeight) is multiplied by the constraintWeight
-
penalizeLong
default <Score_ extends Score<Score_>> @NonNull BiConstraintBuilder<A,B, penalizeLongScore_> (@NonNull Score_ constraintWeight, @NonNull ToLongBiFunction<A, B> matchWeigher) Description copied from interface:BiConstraintStreamAs defined byBiConstraintStream.penalize(Score, ToIntBiFunction), with a penalty of type long.- Specified by:
penalizeLongin interfaceBiConstraintStream<A,B>
-
penalizeBigDecimal
default <Score_ extends Score<Score_>> @NonNull BiConstraintBuilder<A,B, penalizeBigDecimalScore_> (@NonNull Score_ constraintWeight, @NonNull BiFunction<A, B, BigDecimal> matchWeigher) Description copied from interface:BiConstraintStreamAs defined byBiConstraintStream.penalize(Score, ToIntBiFunction), with a penalty of typeBigDecimal.- Specified by:
penalizeBigDecimalin interfaceBiConstraintStream<A,B>
-
penalizeConfigurable
Description copied from interface:BiConstraintStreamNegatively impacts theScore, subtracting theConstraintWeightmultiplied by match weight for each match, and returns a builder to apply optional constraint properties.The constraintWeight comes from an
ConstraintWeightannotated member on theConstraintConfiguration, so end users can change the constraint weights dynamically. This constraint may be deactivated if theConstraintWeightis zero.- Specified by:
penalizeConfigurablein interfaceBiConstraintStream<A,B> - Parameters:
matchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
penalizeConfigurableLong
Description copied from interface:BiConstraintStreamAs defined byBiConstraintStream.penalizeConfigurable(ToIntBiFunction), with a penalty of type long.- Specified by:
penalizeConfigurableLongin interfaceBiConstraintStream<A,B>
-
penalizeConfigurableBigDecimal
default BiConstraintBuilder<A,B, penalizeConfigurableBigDecimal?> (BiFunction<A, B, BigDecimal> matchWeigher) Description copied from interface:BiConstraintStreamAs defined byBiConstraintStream.penalizeConfigurable(ToIntBiFunction), with a penalty of typeBigDecimal.- Specified by:
penalizeConfigurableBigDecimalin interfaceBiConstraintStream<A,B>
-
reward
default <Score_ extends Score<Score_>> @NonNull BiConstraintBuilder<A,B, rewardScore_> (@NonNull Score_ constraintWeight, @NonNull ToIntBiFunction<A, B> matchWeigher) Description copied from interface:BiConstraintStreamApplies a positiveScoreimpact, adding the constraintWeight multiplied by the match weight, and returns a builder to apply optional constraint properties.The constraintWeight specified here can be overridden using
ConstraintWeightOverrideson thePlanningSolution-annotated classFor non-int
Scoretypes useBiConstraintStream.rewardLong(Score, ToLongBiFunction)orBiConstraintStream.rewardBigDecimal(Score, BiFunction)instead.- Specified by:
rewardin interfaceBiConstraintStream<A,B> matchWeigher- the result of this function (matchWeight) is multiplied by the constraintWeight
-
rewardLong
default <Score_ extends Score<Score_>> @NonNull BiConstraintBuilder<A,B, rewardLongScore_> (@NonNull Score_ constraintWeight, @NonNull ToLongBiFunction<A, B> matchWeigher) Description copied from interface:BiConstraintStreamAs defined byBiConstraintStream.reward(Score, ToIntBiFunction), with a penalty of type long.- Specified by:
rewardLongin interfaceBiConstraintStream<A,B>
-
rewardBigDecimal
default <Score_ extends Score<Score_>> @NonNull BiConstraintBuilder<A,B, rewardBigDecimalScore_> (@NonNull Score_ constraintWeight, @NonNull BiFunction<A, B, BigDecimal> matchWeigher) Description copied from interface:BiConstraintStreamAs defined byBiConstraintStream.reward(Score, ToIntBiFunction), with a penalty of typeBigDecimal.- Specified by:
rewardBigDecimalin interfaceBiConstraintStream<A,B>
-
rewardConfigurable
Description copied from interface:BiConstraintStreamPositively impacts theScore, adding theConstraintWeightmultiplied by match weight for each match, and returns a builder to apply optional constraint properties.The constraintWeight comes from an
ConstraintWeightannotated member on theConstraintConfiguration, so end users can change the constraint weights dynamically. This constraint may be deactivated if theConstraintWeightis zero.- Specified by:
rewardConfigurablein interfaceBiConstraintStream<A,B> - Parameters:
matchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
rewardConfigurableLong
Description copied from interface:BiConstraintStreamAs defined byBiConstraintStream.rewardConfigurable(ToIntBiFunction), with a penalty of type long.- Specified by:
rewardConfigurableLongin interfaceBiConstraintStream<A,B>
-
rewardConfigurableBigDecimal
default BiConstraintBuilder<A,B, rewardConfigurableBigDecimal?> (BiFunction<A, B, BigDecimal> matchWeigher) Description copied from interface:BiConstraintStreamAs defined byBiConstraintStream.rewardConfigurable(ToIntBiFunction), with a penalty of typeBigDecimal.- Specified by:
rewardConfigurableBigDecimalin interfaceBiConstraintStream<A,B>
-
impact
default <Score_ extends Score<Score_>> @NonNull BiConstraintBuilder<A,B, impactScore_> (@NonNull Score_ constraintWeight, @NonNull ToIntBiFunction<A, B> matchWeigher) Description copied from interface:BiConstraintStreamPositively or negatively impacts theScoreby constraintWeight multiplied by matchWeight for each match and returns a builder to apply optional constraint properties.The constraintWeight specified here can be overridden using
ConstraintWeightOverrideson thePlanningSolution-annotated classUse
penalize(...)orreward(...)instead, unless this constraint can both have positive and negative weights.- Specified by:
impactin interfaceBiConstraintStream<A,B> matchWeigher- the result of this function (matchWeight) is multiplied by the constraintWeight
-
impactLong
default <Score_ extends Score<Score_>> @NonNull BiConstraintBuilder<A,B, impactLongScore_> (@NonNull Score_ constraintWeight, @NonNull ToLongBiFunction<A, B> matchWeigher) Description copied from interface:BiConstraintStreamAs defined byBiConstraintStream.impact(Score, ToIntBiFunction), with an impact of type long.- Specified by:
impactLongin interfaceBiConstraintStream<A,B>
-
impactBigDecimal
default <Score_ extends Score<Score_>> @NonNull BiConstraintBuilder<A,B, impactBigDecimalScore_> (@NonNull Score_ constraintWeight, @NonNull BiFunction<A, B, BigDecimal> matchWeigher) Description copied from interface:BiConstraintStreamAs defined byBiConstraintStream.impact(Score, ToIntBiFunction), with an impact of typeBigDecimal.- Specified by:
impactBigDecimalin interfaceBiConstraintStream<A,B>
-
impactConfigurable
Description copied from interface:BiConstraintStreamPositively impacts theScoreby theConstraintWeightmultiplied by match weight for each match, and returns a builder to apply optional constraint properties.The constraintWeight comes from an
ConstraintWeightannotated member on theConstraintConfiguration, so end users can change the constraint weights dynamically. This constraint may be deactivated if theConstraintWeightis zero.- Specified by:
impactConfigurablein interfaceBiConstraintStream<A,B> - Returns:
- never null
-
impactConfigurableLong
Description copied from interface:BiConstraintStreamAs defined byBiConstraintStream.impactConfigurable(ToIntBiFunction), with an impact of type long.- Specified by:
impactConfigurableLongin interfaceBiConstraintStream<A,B>
-
impactConfigurableBigDecimal
default BiConstraintBuilder<A,B, impactConfigurableBigDecimal?> (BiFunction<A, B, BigDecimal> matchWeigher) Description copied from interface:BiConstraintStreamAs defined byBiConstraintStream.impactConfigurable(ToIntBiFunction), with an impact of type BigDecimal.- Specified by:
impactConfigurableBigDecimalin interfaceBiConstraintStream<A,B>
-
innerImpact
<Score_ extends Score<Score_>> BiConstraintBuilder<A,B, innerImpactScore_> (Score_ constraintWeight, ToIntBiFunction<A, B> matchWeigher, ScoreImpactType scoreImpactType) -
innerImpact
<Score_ extends Score<Score_>> BiConstraintBuilder<A,B, innerImpactScore_> (Score_ constraintWeight, ToLongBiFunction<A, B> matchWeigher, ScoreImpactType scoreImpactType) -
innerImpact
<Score_ extends Score<Score_>> BiConstraintBuilder<A,B, innerImpactScore_> (Score_ constraintWeight, BiFunction<A, B, BigDecimal> matchWeigher, ScoreImpactType scoreImpactType) -
penalize
default @NonNull Constraint penalize(@NonNull String constraintName, @NonNull Score<?> constraintWeight) Description copied from interface:ConstraintStreamNegatively impact theScore: subtract the constraintWeight for each match.To avoid hard-coding the constraintWeight, to allow end-users to tweak it, use
ConstraintStream.penalizeConfigurable(String)and aConstraintConfigurationinstead.The
constraint packagedefaults to the package of thePlanningSolutionclass.- Specified by:
penalizein interfaceConstraintStream- Parameters:
constraintName- shows up inConstraintMatchTotalduring score justification
-
penalize
default @NonNull Constraint penalize(@NonNull String constraintPackage, @NonNull String constraintName, @NonNull Score<?> constraintWeight) Description copied from interface:ConstraintStreamAs defined byConstraintStream.penalize(String, Score).- Specified by:
penalizein interfaceConstraintStream
-
penalizeConfigurable
Description copied from interface:ConstraintStreamNegatively impact theScore: subtract theConstraintWeightfor each match.The constraintWeight comes from an
ConstraintWeightannotated member on theConstraintConfiguration, so end users can change the constraint weights dynamically. This constraint may be deactivated if theConstraintWeightis zero.The
constraint packagedefaults toConstraintConfiguration.constraintPackage().- Specified by:
penalizeConfigurablein interfaceConstraintStream- Parameters:
constraintName- shows up inConstraintMatchTotalduring score justification
-
penalizeConfigurable
default @NonNull Constraint penalizeConfigurable(@NonNull String constraintPackage, @NonNull String constraintName) Description copied from interface:ConstraintStreamAs defined byConstraintStream.penalizeConfigurable(String).- Specified by:
penalizeConfigurablein interfaceConstraintStream
-
reward
default @NonNull Constraint reward(@NonNull String constraintName, @NonNull Score<?> constraintWeight) Description copied from interface:ConstraintStreamPositively impact theScore: add the constraintWeight for each match.To avoid hard-coding the constraintWeight, to allow end-users to tweak it, use
ConstraintStream.penalizeConfigurable(String)and aConstraintConfigurationinstead.The
constraint packagedefaults to the package of thePlanningSolutionclass.- Specified by:
rewardin interfaceConstraintStream- Parameters:
constraintName- shows up inConstraintMatchTotalduring score justification
-
reward
default @NonNull Constraint reward(@NonNull String constraintPackage, @NonNull String constraintName, @NonNull Score<?> constraintWeight) Description copied from interface:ConstraintStreamAs defined byConstraintStream.reward(String, Score).- Specified by:
rewardin interfaceConstraintStream
-
rewardConfigurable
Description copied from interface:ConstraintStreamPositively impact theScore: add theConstraintWeightfor each match.The constraintWeight comes from an
ConstraintWeightannotated member on theConstraintConfiguration, so end users can change the constraint weights dynamically. This constraint may be deactivated if theConstraintWeightis zero.The
constraint packagedefaults toConstraintConfiguration.constraintPackage().- Specified by:
rewardConfigurablein interfaceConstraintStream- Parameters:
constraintName- shows up inConstraintMatchTotalduring score justification
-
rewardConfigurable
default @NonNull Constraint rewardConfigurable(@NonNull String constraintPackage, @NonNull String constraintName) Description copied from interface:ConstraintStreamAs defined byConstraintStream.rewardConfigurable(String).- Specified by:
rewardConfigurablein interfaceConstraintStream
-
impact
default @NonNull Constraint impact(@NonNull String constraintName, @NonNull Score<?> constraintWeight) Description copied from interface:ConstraintStreamPositively or negatively impact theScoreby the constraintWeight for each match.Use
penalize(...)orreward(...)instead, unless this constraint can both have positive and negative weights.The
constraint packagedefaults to the package of thePlanningSolutionclass.- Specified by:
impactin interfaceConstraintStream- Parameters:
constraintName- shows up inConstraintMatchTotalduring score justification
-
impact
default @NonNull Constraint impact(@NonNull String constraintPackage, @NonNull String constraintName, @NonNull Score<?> constraintWeight) Description copied from interface:ConstraintStreamAs defined byConstraintStream.impact(String, Score).- Specified by:
impactin interfaceConstraintStream
-