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 @NonNull TriConstraintStream<A,B, C> distinct()booleanThis method will return true if the constraint stream is guaranteed to only produce distinct tuples.default <D> @NonNull TriConstraintStream<A,B, C> As defined byTriConstraintStream.ifExists(Class, QuadJoiner).default <D> @NonNull TriConstraintStream<A,B, C> ifExistsIncludingUnassigned(@NonNull Class<D> otherClass, @NonNull QuadJoiner<A, B, C, D> @NonNull ... joiners) default <D> @NonNull TriConstraintStream<A,B, C> ifNotExists(@NonNull Class<D> otherClass, @NonNull QuadJoiner<A, B, C, D> @NonNull ... joiners) As defined byTriConstraintStream.ifNotExists(Class, QuadJoiner).default <D> @NonNull TriConstraintStream<A,B, C> ifNotExistsIncludingUnassigned(@NonNull Class<D> otherClass, @NonNull QuadJoiner<A, B, C, D> @NonNull ... 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 TriConstraintBuilder<A,B, C, Score_> impact(@NonNull Score_ constraintWeight, @NonNull 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_>>
@NonNull TriConstraintBuilder<A,B, C, Score_> impactBigDecimal(@NonNull Score_ constraintWeight, @NonNull 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_>>
@NonNull TriConstraintBuilder<A,B, C, Score_> impactLong(@NonNull Score_ constraintWeight, @NonNull 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> @NonNull QuadConstraintStream<A,B, C, D> As defined byTriConstraintStream.join(Class, QuadJoiner).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 TriConstraintBuilder<A,B, C, Score_> penalize(@NonNull Score_ constraintWeight, @NonNull 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_>>
@NonNull TriConstraintBuilder<A,B, C, Score_> penalizeBigDecimal(@NonNull Score_ constraintWeight, @NonNull TriFunction<A, B, C, BigDecimal> matchWeigher) As defined byTriConstraintStream.penalize(Score, ToIntTriFunction), 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 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 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_>>
@NonNull TriConstraintBuilder<A,B, C, Score_> penalizeLong(@NonNull Score_ constraintWeight, @NonNull ToLongTriFunction<A, B, C> matchWeigher) As defined byTriConstraintStream.penalize(Score, ToIntTriFunction), 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 TriConstraintBuilder<A,B, C, Score_> reward(@NonNull Score_ constraintWeight, @NonNull 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_>>
@NonNull TriConstraintBuilder<A,B, C, Score_> rewardBigDecimal(@NonNull Score_ constraintWeight, @NonNull TriFunction<A, B, C, BigDecimal> matchWeigher) As defined byTriConstraintStream.reward(Score, ToIntTriFunction), 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 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 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_>>
@NonNull TriConstraintBuilder<A,B, C, Score_> rewardLong(@NonNull Score_ constraintWeight, @NonNull 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
default <D> @NonNull QuadConstraintStream<A,B, joinC, D> (@NonNull Class<D> otherClass, @NonNull QuadJoiner<A, B, C, D> @NonNull ... joiners) 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> @NonNull TriConstraintStream<A,B, ifExistsC> (@NonNull Class<D> otherClass, @NonNull QuadJoiner<A, B, C, D> @NonNull ... 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- Returns:
- a stream that matches every tuple of A, B and C where D exists for which the
QuadJoiners are true
-
ifExistsIncludingUnassigned
default <D> @NonNull TriConstraintStream<A,B, ifExistsIncludingUnassignedC> (@NonNull Class<D> otherClass, @NonNull QuadJoiner<A, B, C, D> @NonNull ... 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- Returns:
- a stream that matches every tuple of A, B and C where D exists for which the
QuadJoiners are true
-
ifNotExists
default <D> @NonNull TriConstraintStream<A,B, ifNotExistsC> (@NonNull Class<D> otherClass, @NonNull QuadJoiner<A, B, C, D> @NonNull ... 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- Returns:
- 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> @NonNull TriConstraintStream<A,B, ifNotExistsIncludingUnassignedC> (@NonNull Class<D> otherClass, @NonNull QuadJoiner<A, B, C, D> @NonNull ... 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- Returns:
- 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>
-
penalize
default <Score_ extends Score<Score_>> @NonNull TriConstraintBuilder<A,B, penalizeC, Score_> (@NonNull Score_ constraintWeight, @NonNull 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> matchWeigher- the result of this function (matchWeight) is multiplied by the constraintWeight
-
penalizeLong
default <Score_ extends Score<Score_>> @NonNull TriConstraintBuilder<A,B, penalizeLongC, Score_> (@NonNull Score_ constraintWeight, @NonNull 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_>> @NonNull TriConstraintBuilder<A,B, penalizeBigDecimalC, Score_> (@NonNull Score_ constraintWeight, @NonNull 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_>> @NonNull TriConstraintBuilder<A,B, rewardC, Score_> (@NonNull Score_ constraintWeight, @NonNull 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> matchWeigher- the result of this function (matchWeight) is multiplied by the constraintWeight
-
rewardLong
default <Score_ extends Score<Score_>> @NonNull TriConstraintBuilder<A,B, rewardLongC, Score_> (@NonNull Score_ constraintWeight, @NonNull 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_>> @NonNull TriConstraintBuilder<A,B, rewardBigDecimalC, Score_> (@NonNull Score_ constraintWeight, @NonNull 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_>> @NonNull TriConstraintBuilder<A,B, impactC, Score_> (@NonNull Score_ constraintWeight, @NonNull 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> matchWeigher- the result of this function (matchWeight) is multiplied by the constraintWeight
-
impactLong
default <Score_ extends Score<Score_>> @NonNull TriConstraintBuilder<A,B, impactLongC, Score_> (@NonNull Score_ constraintWeight, @NonNull 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_>> @NonNull TriConstraintBuilder<A,B, impactBigDecimalC, Score_> (@NonNull Score_ constraintWeight, @NonNull 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
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
-