Interface InnerQuadConstraintStream<A,B,C,D>
- All Superinterfaces:
ConstraintStream,QuadConstraintStream<A,B, C, D>
- All Known Implementing Classes:
BavetAbstractQuadConstraintStream,BavetAftBridgeQuadConstraintStream,BavetBiConcatQuadConstraintStream,BavetForeBridgeQuadConstraintStream,BavetJoinQuadConstraintStream,BavetQuadConcatQuadConstraintStream,BavetTriConcatQuadConstraintStream,BavetUniConcatQuadConstraintStream
-
Method Summary
Modifier and TypeMethodDescriptionstatic <A,B, C, D> QuadFunction<A, B, C, D, Collection<?>> static <A,B, C, D> PentaFunction<A, B, C, D, Score<?>, DefaultConstraintJustification> default QuadConstraintStream<A,B, C, D> 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 <E> QuadConstraintStream<A,B, C, D> As defined byQuadConstraintStream.ifExists(Class, PentaJoiner).default <E> QuadConstraintStream<A,B, C, D> ifExistsIncludingUnassigned(Class<E> otherClass, PentaJoiner<A, B, C, D, E>... joiners) default <E> QuadConstraintStream<A,B, C, D> ifNotExists(Class<E> otherClass, PentaJoiner<A, B, C, D, E>... joiners) As defined byQuadConstraintStream.ifNotExists(Class, PentaJoiner).default <E> QuadConstraintStream<A,B, C, D> ifNotExistsIncludingUnassigned(Class<E> otherClass, PentaJoiner<A, B, C, D, E>... joiners) default ConstraintPositively or negatively impact theScoreby the constraintWeight for each match.default ConstraintAs defined byConstraintStream.impact(String, Score).Positively or negatively impacts theScoreby constraintWeight multiplied by matchWeight for each match and returns a builder to apply optional constraint properties.impactBigDecimal(Score_ constraintWeight, QuadFunction<A, B, C, D, BigDecimal> matchWeigher) As defined byQuadConstraintStream.impact(Score, ToIntQuadFunction), with an impact of typeBigDecimal.default QuadConstraintBuilder<A,B, C, D, ?> impactConfigurable(ToIntQuadFunction<A, B, C, D> matchWeigher) Positively impacts theScoreby theConstraintWeightmultiplied by match weight for each match, and returns a builder to apply optional constraint properties.default QuadConstraintBuilder<A,B, C, D, ?> impactConfigurableBigDecimal(QuadFunction<A, B, C, D, BigDecimal> matchWeigher) As defined byQuadConstraintStream.impactConfigurable(ToIntQuadFunction), with an impact of type BigDecimal.default QuadConstraintBuilder<A,B, C, D, ?> impactConfigurableLong(ToLongQuadFunction<A, B, C, D> matchWeigher) As defined byQuadConstraintStream.impactConfigurable(ToIntQuadFunction), with an impact of type long.impactLong(Score_ constraintWeight, ToLongQuadFunction<A, B, C, D> matchWeigher) As defined byQuadConstraintStream.impact(Score, ToIntQuadFunction), with an impact of type long.innerImpact(Score_ constraintWeight, QuadFunction<A, B, C, D, BigDecimal> matchWeigher, ScoreImpactType scoreImpactType) innerImpact(Score_ constraintWeight, ToIntQuadFunction<A, B, C, D> matchWeigher, ScoreImpactType scoreImpactType) innerImpact(Score_ constraintWeight, ToLongQuadFunction<A, B, C, D> matchWeigher, ScoreImpactType scoreImpactType) default ConstraintNegatively impact theScore: subtract the constraintWeight for each match.default ConstraintAs defined byConstraintStream.penalize(String, Score).Applies a negativeScoreimpact, subtracting the constraintWeight multiplied by the match weight, and returns a builder to apply optional constraint properties.penalizeBigDecimal(Score_ constraintWeight, QuadFunction<A, B, C, D, BigDecimal> matchWeigher) As defined byQuadConstraintStream.penalize(Score, ToIntQuadFunction), with a penalty of typeBigDecimal.default QuadConstraintBuilder<A,B, C, D, ?> penalizeConfigurable(ToIntQuadFunction<A, B, C, D> 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 QuadConstraintBuilder<A,B, C, D, ?> penalizeConfigurableBigDecimal(QuadFunction<A, B, C, D, BigDecimal> matchWeigher) As defined byQuadConstraintStream.penalizeConfigurable(ToIntQuadFunction), with a penalty of typeBigDecimal.default QuadConstraintBuilder<A,B, C, D, ?> penalizeConfigurableLong(ToLongQuadFunction<A, B, C, D> matchWeigher) As defined byQuadConstraintStream.penalizeConfigurable(ToIntQuadFunction), with a penalty of type long.penalizeLong(Score_ constraintWeight, ToLongQuadFunction<A, B, C, D> matchWeigher) As defined byQuadConstraintStream.penalize(Score, ToIntQuadFunction), with a penalty of type long.default ConstraintPositively impact theScore: add the constraintWeight for each match.default ConstraintAs defined byConstraintStream.reward(String, Score).Applies a positiveScoreimpact, adding the constraintWeight multiplied by the match weight, and returns a builder to apply optional constraint properties.rewardBigDecimal(Score_ constraintWeight, QuadFunction<A, B, C, D, BigDecimal> matchWeigher) As defined byQuadConstraintStream.reward(Score, ToIntQuadFunction), with a penalty of typeBigDecimal.default QuadConstraintBuilder<A,B, C, D, ?> rewardConfigurable(ToIntQuadFunction<A, B, C, D> 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 QuadConstraintBuilder<A,B, C, D, ?> rewardConfigurableBigDecimal(QuadFunction<A, B, C, D, BigDecimal> matchWeigher) As defined byQuadConstraintStream.rewardConfigurable(ToIntQuadFunction), with a penalty of typeBigDecimal.default QuadConstraintBuilder<A,B, C, D, ?> rewardConfigurableLong(ToLongQuadFunction<A, B, C, D> matchWeigher) As defined byQuadConstraintStream.rewardConfigurable(ToIntQuadFunction), with a penalty of type long.rewardLong(Score_ constraintWeight, ToLongQuadFunction<A, B, C, D> matchWeigher) As defined byQuadConstraintStream.reward(Score, ToIntQuadFunction), 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.quad.QuadConstraintStream
complement, complement, concat, concat, concat, concat, concat, concat, concat, 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, 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, PentaFunction<A,C, D> B, createDefaultJustificationMapping()C, D, 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
-
ifExists
default <E> QuadConstraintStream<A,B, ifExistsC, D> (Class<E> otherClass, PentaJoiner<A, B, C, D, E>... joiners) Description copied from interface:QuadConstraintStreamAs defined byQuadConstraintStream.ifExists(Class, PentaJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.This method causes Unchecked generics array creation for varargs parameter warnings, but we can't fix it with a
SafeVarargsannotation because it's an interface method. Therefore, there are overloaded methods with up to 4PentaJoinerparameters.- Specified by:
ifExistsin interfaceQuadConstraintStream<A,B, C, D> - Type Parameters:
E- the type of the fifth matched fact- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, a stream that matches every tuple of A, B, C and D where E exists for which the
PentaJoiners are true
-
ifExistsIncludingUnassigned
default <E> QuadConstraintStream<A,B, ifExistsIncludingUnassignedC, D> (Class<E> otherClass, PentaJoiner<A, B, C, D, E>... joiners) Description copied from interface:QuadConstraintStreamAs defined byQuadConstraintStream.ifExistsIncludingNullVars(Class, PentaJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.This method causes Unchecked generics array creation for varargs parameter warnings, but we can't fix it with a
SafeVarargsannotation because it's an interface method. Therefore, there are overloaded methods with up to 4PentaJoinerparameters.- Specified by:
ifExistsIncludingUnassignedin interfaceQuadConstraintStream<A,B, C, D> - Type Parameters:
E- the type of the fifth matched fact- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, a stream that matches every tuple of A, B, C and D where E exists for which the
PentaJoiners are true
-
ifNotExists
default <E> QuadConstraintStream<A,B, ifNotExistsC, D> (Class<E> otherClass, PentaJoiner<A, B, C, D, E>... joiners) Description copied from interface:QuadConstraintStreamAs defined byQuadConstraintStream.ifNotExists(Class, PentaJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.This method causes Unchecked generics array creation for varargs parameter warnings, but we can't fix it with a
SafeVarargsannotation because it's an interface method. Therefore, there are overloaded methods with up to 4PentaJoinerparameters.- Specified by:
ifNotExistsin interfaceQuadConstraintStream<A,B, C, D> - Type Parameters:
E- the type of the fifth matched fact- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, a stream that matches every tuple of A, B, C and D where E does not exist for which the
PentaJoiners are true
-
ifNotExistsIncludingUnassigned
default <E> QuadConstraintStream<A,B, ifNotExistsIncludingUnassignedC, D> (Class<E> otherClass, PentaJoiner<A, B, C, D, E>... joiners) Description copied from interface:QuadConstraintStreamAs defined byQuadConstraintStream.ifNotExistsIncludingUnassigned(Class, PentaJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.This method causes Unchecked generics array creation for varargs parameter warnings, but we can't fix it with a
SafeVarargsannotation because it's an interface method. Therefore, there are overloaded methods with up to 4PentaJoinerparameters.- Specified by:
ifNotExistsIncludingUnassignedin interfaceQuadConstraintStream<A,B, C, D> - Type Parameters:
E- the type of the fifth matched fact- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, a stream that matches every tuple of A, B, C and D where E does not exist for which the
PentaJoiners are true
-
distinct
Description copied from interface:QuadConstraintStreamTransforms the stream in such a way that all the tuples going through it are distinct. (No two tuples willequal.)By default, tuples going through a constraint stream are distinct. However, operations such as
QuadConstraintStream.map(QuadFunction)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. -
penalize
default <Score_ extends Score<Score_>> QuadConstraintBuilder<A,B, penalizeC, D, Score_> (Score_ constraintWeight, ToIntQuadFunction<A, B, C, D> matchWeigher) Description copied from interface:QuadConstraintStreamApplies 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 useQuadConstraintStream.penalizeLong(Score, ToLongQuadFunction)orQuadConstraintStream.penalizeBigDecimal(Score, QuadFunction)instead. -
penalizeLong
default <Score_ extends Score<Score_>> QuadConstraintBuilder<A,B, penalizeLongC, D, Score_> (Score_ constraintWeight, ToLongQuadFunction<A, B, C, D> matchWeigher) Description copied from interface:QuadConstraintStreamAs defined byQuadConstraintStream.penalize(Score, ToIntQuadFunction), with a penalty of type long.- Specified by:
penalizeLongin interfaceQuadConstraintStream<A,B, C, D>
-
penalizeBigDecimal
default <Score_ extends Score<Score_>> QuadConstraintBuilder<A,B, penalizeBigDecimalC, D, Score_> (Score_ constraintWeight, QuadFunction<A, B, C, D, BigDecimal> matchWeigher) Description copied from interface:QuadConstraintStreamAs defined byQuadConstraintStream.penalize(Score, ToIntQuadFunction), with a penalty of typeBigDecimal.- Specified by:
penalizeBigDecimalin interfaceQuadConstraintStream<A,B, C, D>
-
penalizeConfigurable
default QuadConstraintBuilder<A,B, penalizeConfigurableC, D, ?> (ToIntQuadFunction<A, B, C, D> matchWeigher) Description copied from interface:QuadConstraintStreamNegatively 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 interfaceQuadConstraintStream<A,B, C, D> - Parameters:
matchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
penalizeConfigurableLong
default QuadConstraintBuilder<A,B, penalizeConfigurableLongC, D, ?> (ToLongQuadFunction<A, B, C, D> matchWeigher) Description copied from interface:QuadConstraintStreamAs defined byQuadConstraintStream.penalizeConfigurable(ToIntQuadFunction), with a penalty of type long.- Specified by:
penalizeConfigurableLongin interfaceQuadConstraintStream<A,B, C, D>
-
penalizeConfigurableBigDecimal
default QuadConstraintBuilder<A,B, penalizeConfigurableBigDecimalC, D, ?> (QuadFunction<A, B, C, D, BigDecimal> matchWeigher) Description copied from interface:QuadConstraintStreamAs defined byQuadConstraintStream.penalizeConfigurable(ToIntQuadFunction), with a penalty of typeBigDecimal.- Specified by:
penalizeConfigurableBigDecimalin interfaceQuadConstraintStream<A,B, C, D>
-
reward
default <Score_ extends Score<Score_>> QuadConstraintBuilder<A,B, rewardC, D, Score_> (Score_ constraintWeight, ToIntQuadFunction<A, B, C, D> matchWeigher) Description copied from interface:QuadConstraintStreamApplies 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 useQuadConstraintStream.rewardLong(Score, ToLongQuadFunction)orQuadConstraintStream.rewardBigDecimal(Score, QuadFunction)instead. -
rewardLong
default <Score_ extends Score<Score_>> QuadConstraintBuilder<A,B, rewardLongC, D, Score_> (Score_ constraintWeight, ToLongQuadFunction<A, B, C, D> matchWeigher) Description copied from interface:QuadConstraintStreamAs defined byQuadConstraintStream.reward(Score, ToIntQuadFunction), with a penalty of type long.- Specified by:
rewardLongin interfaceQuadConstraintStream<A,B, C, D>
-
rewardBigDecimal
default <Score_ extends Score<Score_>> QuadConstraintBuilder<A,B, rewardBigDecimalC, D, Score_> (Score_ constraintWeight, QuadFunction<A, B, C, D, BigDecimal> matchWeigher) Description copied from interface:QuadConstraintStreamAs defined byQuadConstraintStream.reward(Score, ToIntQuadFunction), with a penalty of typeBigDecimal.- Specified by:
rewardBigDecimalin interfaceQuadConstraintStream<A,B, C, D>
-
rewardConfigurable
default QuadConstraintBuilder<A,B, rewardConfigurableC, D, ?> (ToIntQuadFunction<A, B, C, D> matchWeigher) Description copied from interface:QuadConstraintStreamPositively 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 interfaceQuadConstraintStream<A,B, C, D> - Parameters:
matchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
rewardConfigurableLong
default QuadConstraintBuilder<A,B, rewardConfigurableLongC, D, ?> (ToLongQuadFunction<A, B, C, D> matchWeigher) Description copied from interface:QuadConstraintStreamAs defined byQuadConstraintStream.rewardConfigurable(ToIntQuadFunction), with a penalty of type long.- Specified by:
rewardConfigurableLongin interfaceQuadConstraintStream<A,B, C, D>
-
rewardConfigurableBigDecimal
default QuadConstraintBuilder<A,B, rewardConfigurableBigDecimalC, D, ?> (QuadFunction<A, B, C, D, BigDecimal> matchWeigher) Description copied from interface:QuadConstraintStreamAs defined byQuadConstraintStream.rewardConfigurable(ToIntQuadFunction), with a penalty of typeBigDecimal.- Specified by:
rewardConfigurableBigDecimalin interfaceQuadConstraintStream<A,B, C, D>
-
impact
default <Score_ extends Score<Score_>> QuadConstraintBuilder<A,B, impactC, D, Score_> (Score_ constraintWeight, ToIntQuadFunction<A, B, C, D> matchWeigher) Description copied from interface:QuadConstraintStreamPositively 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. -
impactLong
default <Score_ extends Score<Score_>> QuadConstraintBuilder<A,B, impactLongC, D, Score_> (Score_ constraintWeight, ToLongQuadFunction<A, B, C, D> matchWeigher) Description copied from interface:QuadConstraintStreamAs defined byQuadConstraintStream.impact(Score, ToIntQuadFunction), with an impact of type long.- Specified by:
impactLongin interfaceQuadConstraintStream<A,B, C, D>
-
impactBigDecimal
default <Score_ extends Score<Score_>> QuadConstraintBuilder<A,B, impactBigDecimalC, D, Score_> (Score_ constraintWeight, QuadFunction<A, B, C, D, BigDecimal> matchWeigher) Description copied from interface:QuadConstraintStreamAs defined byQuadConstraintStream.impact(Score, ToIntQuadFunction), with an impact of typeBigDecimal.- Specified by:
impactBigDecimalin interfaceQuadConstraintStream<A,B, C, D>
-
impactConfigurable
default QuadConstraintBuilder<A,B, impactConfigurableC, D, ?> (ToIntQuadFunction<A, B, C, D> matchWeigher) Description copied from interface:QuadConstraintStreamPositively 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 interfaceQuadConstraintStream<A,B, C, D> - Returns:
- never null
-
impactConfigurableLong
default QuadConstraintBuilder<A,B, impactConfigurableLongC, D, ?> (ToLongQuadFunction<A, B, C, D> matchWeigher) Description copied from interface:QuadConstraintStreamAs defined byQuadConstraintStream.impactConfigurable(ToIntQuadFunction), with an impact of type long.- Specified by:
impactConfigurableLongin interfaceQuadConstraintStream<A,B, C, D>
-
impactConfigurableBigDecimal
default QuadConstraintBuilder<A,B, impactConfigurableBigDecimalC, D, ?> (QuadFunction<A, B, C, D, BigDecimal> matchWeigher) Description copied from interface:QuadConstraintStreamAs defined byQuadConstraintStream.impactConfigurable(ToIntQuadFunction), with an impact of type BigDecimal.- Specified by:
impactConfigurableBigDecimalin interfaceQuadConstraintStream<A,B, C, D>
-
innerImpact
<Score_ extends Score<Score_>> QuadConstraintBuilder<A,B, innerImpactC, D, Score_> (Score_ constraintWeight, ToIntQuadFunction<A, B, C, D> matchWeigher, ScoreImpactType scoreImpactType) -
innerImpact
<Score_ extends Score<Score_>> QuadConstraintBuilder<A,B, innerImpactC, D, Score_> (Score_ constraintWeight, ToLongQuadFunction<A, B, C, D> matchWeigher, ScoreImpactType scoreImpactType) -
innerImpact
<Score_ extends Score<Score_>> QuadConstraintBuilder<A,B, innerImpactC, D, Score_> (Score_ constraintWeight, QuadFunction<A, B, C, D, 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
-