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 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> BiConstraintStream<A,B> As defined byBiConstraintStream.ifExists(Class, TriJoiner).default <C> BiConstraintStream<A,B> ifExistsIncludingUnassigned(Class<C> otherClass, TriJoiner<A, B, C>... joiners) default <C> BiConstraintStream<A,B> ifNotExists(Class<C> otherClass, TriJoiner<A, B, C>... joiners) As defined byBiConstraintStream.ifNotExists(Class, TriJoiner).default <C> BiConstraintStream<A,B> ifNotExistsIncludingUnassigned(Class<C> otherClass, TriJoiner<A, B, C>... joiners) default ConstraintPositively or negatively impact theScoreby the constraintWeight for each match.default ConstraintAs defined byConstraintStream.impact(String, Score).default <Score_ extends Score<Score_>>
BiConstraintBuilder<A,B, Score_> impact(Score_ constraintWeight, 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_>>
BiConstraintBuilder<A,B, Score_> impactBigDecimal(Score_ constraintWeight, 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_>>
BiConstraintBuilder<A,B, Score_> impactLong(Score_ constraintWeight, 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> TriConstraintStream<A,B, C> As defined byBiConstraintStream.join(Class, TriJoiner).default ConstraintNegatively impact theScore: subtract the constraintWeight for each match.default ConstraintAs defined byConstraintStream.penalize(String, Score).default <Score_ extends Score<Score_>>
BiConstraintBuilder<A,B, Score_> penalize(Score_ constraintWeight, 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_>>
BiConstraintBuilder<A,B, Score_> penalizeBigDecimal(Score_ constraintWeight, BiFunction<A, B, BigDecimal> matchWeigher) As defined byBiConstraintStream.penalize(Score, ToIntBiFunction), with a penalty of typeBigDecimal.default ConstraintpenalizeConfigurable(String constraintName) Negatively impact theScore: subtract theConstraintWeightfor each match.default ConstraintpenalizeConfigurable(String constraintPackage, 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_>>
BiConstraintBuilder<A,B, Score_> penalizeLong(Score_ constraintWeight, ToLongBiFunction<A, B> matchWeigher) As defined byBiConstraintStream.penalize(Score, ToIntBiFunction), with a penalty of type long.default ConstraintPositively impact theScore: add the constraintWeight for each match.default ConstraintAs defined byConstraintStream.reward(String, Score).default <Score_ extends Score<Score_>>
BiConstraintBuilder<A,B, Score_> reward(Score_ constraintWeight, 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_>>
BiConstraintBuilder<A,B, Score_> rewardBigDecimal(Score_ constraintWeight, BiFunction<A, B, BigDecimal> matchWeigher) As defined byBiConstraintStream.reward(Score, ToIntBiFunction), with a penalty of typeBigDecimal.default ConstraintrewardConfigurable(String constraintName) Positively impact theScore: add theConstraintWeightfor each match.default ConstraintrewardConfigurable(String constraintPackage, 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_>>
BiConstraintBuilder<A,B, Score_> rewardLong(Score_ constraintWeight, 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
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- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, a stream that matches every combination of [A, B] and C for which all the
joinersare true
-
ifExists
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- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, a stream that matches every pair of A and B where C exists for which the
TriJoiners are true
-
ifExistsIncludingUnassigned
default <C> BiConstraintStream<A,B> ifExistsIncludingUnassigned(Class<C> otherClass, TriJoiner<A, B, C>... 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- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, a stream that matches every pair of A and B where C exists for which the
TriJoiners are true
-
ifNotExists
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- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, a stream that matches every pair of A and B where C does not exist for which the
TriJoiners are true
-
ifNotExistsIncludingUnassigned
default <C> BiConstraintStream<A,B> ifNotExistsIncludingUnassigned(Class<C> otherClass, 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- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, 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> - Returns:
- never null
-
penalize
default <Score_ extends Score<Score_>> BiConstraintBuilder<A,B, penalizeScore_> (Score_ constraintWeight, 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> - Parameters:
constraintWeight- never nullmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
penalizeLong
default <Score_ extends Score<Score_>> BiConstraintBuilder<A,B, penalizeLongScore_> (Score_ constraintWeight, 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_>> BiConstraintBuilder<A,B, penalizeBigDecimalScore_> (Score_ constraintWeight, 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_>> BiConstraintBuilder<A,B, rewardScore_> (Score_ constraintWeight, 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> - Parameters:
constraintWeight- never nullmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
rewardLong
default <Score_ extends Score<Score_>> BiConstraintBuilder<A,B, rewardLongScore_> (Score_ constraintWeight, 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_>> BiConstraintBuilder<A,B, rewardBigDecimalScore_> (Score_ constraintWeight, 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_>> BiConstraintBuilder<A,B, impactScore_> (Score_ constraintWeight, 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> - Parameters:
constraintWeight- never nullmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
impactLong
default <Score_ extends Score<Score_>> BiConstraintBuilder<A,B, impactLongScore_> (Score_ constraintWeight, 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_>> BiConstraintBuilder<A,B, impactBigDecimalScore_> (Score_ constraintWeight, 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
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- never null, shows up inConstraintMatchTotalduring score justificationconstraintWeight- never null- Returns:
- never null
-
penalize
default Constraint penalize(String constraintPackage, String constraintName, Score<?> constraintWeight) Description copied from interface:ConstraintStreamAs defined byConstraintStream.penalize(String, Score).- Specified by:
penalizein interfaceConstraintStream- Parameters:
constraintPackage- never nullconstraintName- never nullconstraintWeight- never null- Returns:
- never null
-
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- never null, shows up inConstraintMatchTotalduring score justification- Returns:
- never null
-
penalizeConfigurable
Description copied from interface:ConstraintStreamAs defined byConstraintStream.penalizeConfigurable(String).- Specified by:
penalizeConfigurablein interfaceConstraintStream- Parameters:
constraintPackage- never nullconstraintName- never null- Returns:
- never null
-
reward
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- never null, shows up inConstraintMatchTotalduring score justificationconstraintWeight- never null- Returns:
- never null
-
reward
default Constraint reward(String constraintPackage, String constraintName, Score<?> constraintWeight) Description copied from interface:ConstraintStreamAs defined byConstraintStream.reward(String, Score).- Specified by:
rewardin interfaceConstraintStream- Parameters:
constraintPackage- never nullconstraintName- never nullconstraintWeight- never null- Returns:
- never null
-
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- never null, shows up inConstraintMatchTotalduring score justification- Returns:
- never null
-
rewardConfigurable
Description copied from interface:ConstraintStreamAs defined byConstraintStream.rewardConfigurable(String).- Specified by:
rewardConfigurablein interfaceConstraintStream- Parameters:
constraintPackage- never nullconstraintName- never null- Returns:
- never null
-
impact
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- never null, shows up inConstraintMatchTotalduring score justificationconstraintWeight- never null- Returns:
- never null
-
impact
default Constraint impact(String constraintPackage, String constraintName, Score<?> constraintWeight) Description copied from interface:ConstraintStreamAs defined byConstraintStream.impact(String, Score).- Specified by:
impactin interfaceConstraintStream- Parameters:
constraintPackage- never nullconstraintName- never nullconstraintWeight- never null- Returns:
- never null
-