Interface InnerTriConstraintStream<A,B,C>
- All Superinterfaces:
ConstraintStream,TriConstraintStream<A,B, C>
- All Known Implementing Classes:
BavetAbstractTriConstraintStream,BavetAftBridgeTriConstraintStream,BavetBiConcatTriConstraintStream,BavetForeBridgeTriConstraintStream,BavetJoinTriConstraintStream,BavetTriConcatTriConstraintStream,BavetUniConcatTriConstraintStream
-
Method Summary
Modifier and TypeMethodDescriptionstatic <A,B, C> TriFunction<A, B, C, Collection<?>> static <A,B, C> QuadFunction<A, B, C, Score<?>, DefaultConstraintJustification> default TriConstraintStream<A,B, C> distinct()booleanThis method will return true if the constraint stream is guaranteed to only produce distinct tuples.default <D> TriConstraintStream<A,B, C> As defined byTriConstraintStream.ifExists(Class, QuadJoiner).default <D> TriConstraintStream<A,B, C> ifExistsIncludingUnassigned(Class<D> otherClass, QuadJoiner<A, B, C, D>... joiners) default <D> TriConstraintStream<A,B, C> ifNotExists(Class<D> otherClass, QuadJoiner<A, B, C, D>... joiners) As defined byTriConstraintStream.ifNotExists(Class, QuadJoiner).default <D> TriConstraintStream<A,B, C> ifNotExistsIncludingUnassigned(Class<D> otherClass, QuadJoiner<A, B, C, D>... joiners) default ConstraintPositively or negatively impact theScoreby the constraintWeight for each match.default ConstraintAs defined byConstraintStream.impact(String, Score).default <Score_ extends Score<Score_>>
TriConstraintBuilder<A,B, C, Score_> impact(Score_ constraintWeight, ToIntTriFunction<A, B, C> 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_>>
TriConstraintBuilder<A,B, C, Score_> impactBigDecimal(Score_ constraintWeight, TriFunction<A, B, C, BigDecimal> matchWeigher) As defined byTriConstraintStream.impact(Score, ToIntTriFunction), with an impact of typeBigDecimal.default TriConstraintBuilder<A,B, C, ?> impactConfigurable(ToIntTriFunction<A, B, C> matchWeigher) Positively impacts theScoreby theConstraintWeightmultiplied by match weight for each match, and returns a builder to apply optional constraint properties.default TriConstraintBuilder<A,B, C, ?> impactConfigurableBigDecimal(TriFunction<A, B, C, BigDecimal> matchWeigher) As defined byTriConstraintStream.impactConfigurable(ToIntTriFunction), with an impact of type BigDecimal.default TriConstraintBuilder<A,B, C, ?> impactConfigurableLong(ToLongTriFunction<A, B, C> matchWeigher) As defined byTriConstraintStream.impactConfigurable(ToIntTriFunction), with an impact of type long.default <Score_ extends Score<Score_>>
TriConstraintBuilder<A,B, C, Score_> impactLong(Score_ constraintWeight, ToLongTriFunction<A, B, C> matchWeigher) As defined byTriConstraintStream.impact(Score, ToIntTriFunction), with an impact of type long.<Score_ extends Score<Score_>>
TriConstraintBuilder<A,B, C, Score_> innerImpact(Score_ constraintWeight, ToIntTriFunction<A, B, C> matchWeigher, ScoreImpactType scoreImpactType) <Score_ extends Score<Score_>>
TriConstraintBuilder<A,B, C, Score_> innerImpact(Score_ constraintWeight, ToLongTriFunction<A, B, C> matchWeigher, ScoreImpactType scoreImpactType) <Score_ extends Score<Score_>>
TriConstraintBuilder<A,B, C, Score_> innerImpact(Score_ constraintWeight, TriFunction<A, B, C, BigDecimal> matchWeigher, ScoreImpactType scoreImpactType) default <D> QuadConstraintStream<A,B, C, D> As defined byTriConstraintStream.join(Class, QuadJoiner).default ConstraintNegatively impact theScore: subtract the constraintWeight for each match.default ConstraintAs defined byConstraintStream.penalize(String, Score).default <Score_ extends Score<Score_>>
TriConstraintBuilder<A,B, C, Score_> penalize(Score_ constraintWeight, ToIntTriFunction<A, B, C> 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_>>
TriConstraintBuilder<A,B, C, Score_> penalizeBigDecimal(Score_ constraintWeight, TriFunction<A, B, C, BigDecimal> matchWeigher) As defined byTriConstraintStream.penalize(Score, ToIntTriFunction), with a penalty of typeBigDecimal.default TriConstraintBuilder<A,B, C, ?> penalizeConfigurable(ToIntTriFunction<A, B, C> matchWeigher) Negatively impacts theScore, subtracting theConstraintWeightmultiplied by match weight for each match, and returns a builder to apply optional constraint properties.default ConstraintpenalizeConfigurable(String constraintName) Negatively impact theScore: subtract theConstraintWeightfor each match.default ConstraintpenalizeConfigurable(String constraintPackage, String constraintName) As defined byConstraintStream.penalizeConfigurable(String).default TriConstraintBuilder<A,B, C, ?> penalizeConfigurableBigDecimal(TriFunction<A, B, C, BigDecimal> matchWeigher) As defined byTriConstraintStream.penalizeConfigurable(ToIntTriFunction), with a penalty of typeBigDecimal.default TriConstraintBuilder<A,B, C, ?> penalizeConfigurableLong(ToLongTriFunction<A, B, C> matchWeigher) As defined byTriConstraintStream.penalizeConfigurable(ToIntTriFunction), with a penalty of type long.default <Score_ extends Score<Score_>>
TriConstraintBuilder<A,B, C, Score_> penalizeLong(Score_ constraintWeight, ToLongTriFunction<A, B, C> matchWeigher) As defined byTriConstraintStream.penalize(Score, ToIntTriFunction), 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_>>
TriConstraintBuilder<A,B, C, Score_> reward(Score_ constraintWeight, ToIntTriFunction<A, B, C> 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_>>
TriConstraintBuilder<A,B, C, Score_> rewardBigDecimal(Score_ constraintWeight, TriFunction<A, B, C, BigDecimal> matchWeigher) As defined byTriConstraintStream.reward(Score, ToIntTriFunction), with a penalty of typeBigDecimal.default TriConstraintBuilder<A,B, C, ?> rewardConfigurable(ToIntTriFunction<A, B, C> matchWeigher) Positively impacts theScore, adding theConstraintWeightmultiplied by match weight for each match, and returns a builder to apply optional constraint properties.default ConstraintrewardConfigurable(String constraintName) Positively impact theScore: add theConstraintWeightfor each match.default ConstraintrewardConfigurable(String constraintPackage, String constraintName) As defined byConstraintStream.rewardConfigurable(String).default TriConstraintBuilder<A,B, C, ?> rewardConfigurableBigDecimal(TriFunction<A, B, C, BigDecimal> matchWeigher) As defined byTriConstraintStream.rewardConfigurable(ToIntTriFunction), with a penalty of typeBigDecimal.default TriConstraintBuilder<A,B, C, ?> rewardConfigurableLong(ToLongTriFunction<A, B, C> matchWeigher) As defined byTriConstraintStream.rewardConfigurable(ToIntTriFunction), with a penalty of type long.default <Score_ extends Score<Score_>>
TriConstraintBuilder<A,B, C, Score_> rewardLong(Score_ constraintWeight, ToLongTriFunction<A, B, C> matchWeigher) As defined byTriConstraintStream.reward(Score, ToIntTriFunction), with a penalty of type long.Methods inherited from interface ai.timefold.solver.core.api.score.stream.ConstraintStream
getConstraintFactoryMethods inherited from interface ai.timefold.solver.core.api.score.stream.tri.TriConstraintStream
complement, complement, concat, concat, concat, concat, concat, concat, concat, 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, rewardLong
-
Method Details
-
createDefaultJustificationMapping
static <A,B, QuadFunction<A,C> B, createDefaultJustificationMapping()C, 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:TriConstraintStreamAs defined byTriConstraintStream.join(Class, QuadJoiner). 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 4QuadJoinerparameters. -
ifExists
default <D> TriConstraintStream<A,B, ifExistsC> (Class<D> otherClass, QuadJoiner<A, B, C, D>... joiners) Description copied from interface:TriConstraintStreamAs defined byTriConstraintStream.ifExists(Class, QuadJoiner). 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 4QuadJoinerparameters.- Specified by:
ifExistsin interfaceTriConstraintStream<A,B, C> - Type Parameters:
D- the type of the fourth matched fact- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, a stream that matches every tuple of A, B and C where D exists for which the
QuadJoiners are true
-
ifExistsIncludingUnassigned
default <D> TriConstraintStream<A,B, ifExistsIncludingUnassignedC> (Class<D> otherClass, QuadJoiner<A, B, C, D>... joiners) Description copied from interface:TriConstraintStreamAs defined byTriConstraintStream.ifExistsIncludingUnassigned(Class, QuadJoiner). 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 4QuadJoinerparameters.- Specified by:
ifExistsIncludingUnassignedin interfaceTriConstraintStream<A,B, C> - Type Parameters:
D- the type of the fourth matched fact- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, a stream that matches every tuple of A, B and C where D exists for which the
QuadJoiners are true
-
ifNotExists
default <D> TriConstraintStream<A,B, ifNotExistsC> (Class<D> otherClass, QuadJoiner<A, B, C, D>... joiners) Description copied from interface:TriConstraintStreamAs defined byTriConstraintStream.ifNotExists(Class, QuadJoiner). 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 4QuadJoinerparameters.- Specified by:
ifNotExistsin interfaceTriConstraintStream<A,B, C> - Type Parameters:
D- the type of the fourth matched fact- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, a stream that matches every tuple of A, B and C where D does not exist for which the
QuadJoiners are true
-
ifNotExistsIncludingUnassigned
default <D> TriConstraintStream<A,B, ifNotExistsIncludingUnassignedC> (Class<D> otherClass, QuadJoiner<A, B, C, D>... joiners) Description copied from interface:TriConstraintStreamAs defined byTriConstraintStream.ifNotExistsIncludingUnassigned(Class, QuadJoiner). 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 4QuadJoinerparameters.- Specified by:
ifNotExistsIncludingUnassignedin interfaceTriConstraintStream<A,B, C> - Type Parameters:
D- the type of the fourth matched fact- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, a stream that matches every tuple of A, B and C where D does not exist for which the
QuadJoiners are true
-
distinct
Description copied from interface:TriConstraintStreamRemoves duplicate tuples from the stream, according to the tuple's factsequals/hashCodemethods, such that only distinct tuples remain. (No two tuples willequal.)By default, tuples going through a constraint stream are distinct. However, operations such as
TriConstraintStream.map(TriFunction)may create a stream which breaks that promise. By calling this method on such a stream, duplicate copies of the same tuple will be omitted at a performance cost.- Specified by:
distinctin interfaceTriConstraintStream<A,B, C> - Returns:
- never null
-
penalize
default <Score_ extends Score<Score_>> TriConstraintBuilder<A,B, penalizeC, Score_> (Score_ constraintWeight, ToIntTriFunction<A, B, C> matchWeigher) Description copied from interface:TriConstraintStreamApplies 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 useTriConstraintStream.penalizeLong(Score, ToLongTriFunction)orTriConstraintStream.penalizeBigDecimal(Score, TriFunction)instead.- Specified by:
penalizein interfaceTriConstraintStream<A,B, C> - 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_>> TriConstraintBuilder<A,B, penalizeLongC, Score_> (Score_ constraintWeight, ToLongTriFunction<A, B, C> matchWeigher) Description copied from interface:TriConstraintStreamAs defined byTriConstraintStream.penalize(Score, ToIntTriFunction), with a penalty of type long.- Specified by:
penalizeLongin interfaceTriConstraintStream<A,B, C>
-
penalizeBigDecimal
default <Score_ extends Score<Score_>> TriConstraintBuilder<A,B, penalizeBigDecimalC, Score_> (Score_ constraintWeight, TriFunction<A, B, C, BigDecimal> matchWeigher) Description copied from interface:TriConstraintStreamAs defined byTriConstraintStream.penalize(Score, ToIntTriFunction), with a penalty of typeBigDecimal.- Specified by:
penalizeBigDecimalin interfaceTriConstraintStream<A,B, C>
-
penalizeConfigurable
Description copied from interface:TriConstraintStreamNegatively 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 interfaceTriConstraintStream<A,B, C> - Parameters:
matchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
penalizeConfigurableLong
default TriConstraintBuilder<A,B, penalizeConfigurableLongC, ?> (ToLongTriFunction<A, B, C> matchWeigher) Description copied from interface:TriConstraintStreamAs defined byTriConstraintStream.penalizeConfigurable(ToIntTriFunction), with a penalty of type long.- Specified by:
penalizeConfigurableLongin interfaceTriConstraintStream<A,B, C>
-
penalizeConfigurableBigDecimal
default TriConstraintBuilder<A,B, penalizeConfigurableBigDecimalC, ?> (TriFunction<A, B, C, BigDecimal> matchWeigher) Description copied from interface:TriConstraintStreamAs defined byTriConstraintStream.penalizeConfigurable(ToIntTriFunction), with a penalty of typeBigDecimal.- Specified by:
penalizeConfigurableBigDecimalin interfaceTriConstraintStream<A,B, C>
-
reward
default <Score_ extends Score<Score_>> TriConstraintBuilder<A,B, rewardC, Score_> (Score_ constraintWeight, ToIntTriFunction<A, B, C> matchWeigher) Description copied from interface:TriConstraintStreamApplies 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 useTriConstraintStream.rewardLong(Score, ToLongTriFunction)orTriConstraintStream.rewardBigDecimal(Score, TriFunction)instead.- Specified by:
rewardin interfaceTriConstraintStream<A,B, C> - 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_>> TriConstraintBuilder<A,B, rewardLongC, Score_> (Score_ constraintWeight, ToLongTriFunction<A, B, C> matchWeigher) Description copied from interface:TriConstraintStreamAs defined byTriConstraintStream.reward(Score, ToIntTriFunction), with a penalty of type long.- Specified by:
rewardLongin interfaceTriConstraintStream<A,B, C>
-
rewardBigDecimal
default <Score_ extends Score<Score_>> TriConstraintBuilder<A,B, rewardBigDecimalC, Score_> (Score_ constraintWeight, TriFunction<A, B, C, BigDecimal> matchWeigher) Description copied from interface:TriConstraintStreamAs defined byTriConstraintStream.reward(Score, ToIntTriFunction), with a penalty of typeBigDecimal.- Specified by:
rewardBigDecimalin interfaceTriConstraintStream<A,B, C>
-
rewardConfigurable
Description copied from interface:TriConstraintStreamPositively 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 interfaceTriConstraintStream<A,B, C> - Parameters:
matchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
rewardConfigurableLong
Description copied from interface:TriConstraintStreamAs defined byTriConstraintStream.rewardConfigurable(ToIntTriFunction), with a penalty of type long.- Specified by:
rewardConfigurableLongin interfaceTriConstraintStream<A,B, C>
-
rewardConfigurableBigDecimal
default TriConstraintBuilder<A,B, rewardConfigurableBigDecimalC, ?> (TriFunction<A, B, C, BigDecimal> matchWeigher) Description copied from interface:TriConstraintStreamAs defined byTriConstraintStream.rewardConfigurable(ToIntTriFunction), with a penalty of typeBigDecimal.- Specified by:
rewardConfigurableBigDecimalin interfaceTriConstraintStream<A,B, C>
-
impact
default <Score_ extends Score<Score_>> TriConstraintBuilder<A,B, impactC, Score_> (Score_ constraintWeight, ToIntTriFunction<A, B, C> matchWeigher) Description copied from interface:TriConstraintStreamPositively 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 interfaceTriConstraintStream<A,B, C> - 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_>> TriConstraintBuilder<A,B, impactLongC, Score_> (Score_ constraintWeight, ToLongTriFunction<A, B, C> matchWeigher) Description copied from interface:TriConstraintStreamAs defined byTriConstraintStream.impact(Score, ToIntTriFunction), with an impact of type long.- Specified by:
impactLongin interfaceTriConstraintStream<A,B, C>
-
impactBigDecimal
default <Score_ extends Score<Score_>> TriConstraintBuilder<A,B, impactBigDecimalC, Score_> (Score_ constraintWeight, TriFunction<A, B, C, BigDecimal> matchWeigher) Description copied from interface:TriConstraintStreamAs defined byTriConstraintStream.impact(Score, ToIntTriFunction), with an impact of typeBigDecimal.- Specified by:
impactBigDecimalin interfaceTriConstraintStream<A,B, C>
-
impactConfigurable
Description copied from interface:TriConstraintStreamPositively 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 interfaceTriConstraintStream<A,B, C> - Returns:
- never null
-
impactConfigurableLong
Description copied from interface:TriConstraintStreamAs defined byTriConstraintStream.impactConfigurable(ToIntTriFunction), with an impact of type long.- Specified by:
impactConfigurableLongin interfaceTriConstraintStream<A,B, C>
-
impactConfigurableBigDecimal
default TriConstraintBuilder<A,B, impactConfigurableBigDecimalC, ?> (TriFunction<A, B, C, BigDecimal> matchWeigher) Description copied from interface:TriConstraintStreamAs defined byTriConstraintStream.impactConfigurable(ToIntTriFunction), with an impact of type BigDecimal.- Specified by:
impactConfigurableBigDecimalin interfaceTriConstraintStream<A,B, C>
-
innerImpact
<Score_ extends Score<Score_>> TriConstraintBuilder<A,B, innerImpactC, Score_> (Score_ constraintWeight, ToIntTriFunction<A, B, C> matchWeigher, ScoreImpactType scoreImpactType) -
innerImpact
<Score_ extends Score<Score_>> TriConstraintBuilder<A,B, innerImpactC, Score_> (Score_ constraintWeight, ToLongTriFunction<A, B, C> matchWeigher, ScoreImpactType scoreImpactType) -
innerImpact
<Score_ extends Score<Score_>> TriConstraintBuilder<A,B, innerImpactC, Score_> (Score_ constraintWeight, TriFunction<A, B, C, 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
-