Class TriConstraintBuilderImpl<A,B,C,Score_ extends Score<Score_>>
java.lang.Object
ai.timefold.solver.core.impl.score.stream.common.AbstractConstraintBuilder<Score_>
ai.timefold.solver.core.impl.score.stream.common.tri.TriConstraintBuilderImpl<A,B,C,Score_>
- All Implemented Interfaces:
ConstraintBuilder,TriConstraintBuilder<A,B, C, Score_>
public final class TriConstraintBuilderImpl<A,B,C,Score_ extends Score<Score_>>
extends AbstractConstraintBuilder<Score_>
implements TriConstraintBuilder<A,B,C,Score_>
-
Constructor Summary
ConstructorsConstructorDescriptionTriConstraintBuilderImpl(TriConstraintConstructor<A, B, C, Score_> constraintConstructor, ScoreImpactType impactType, Score_ constraintWeight) -
Method Summary
Modifier and TypeMethodDescriptionprotected TriFunction<A,B, C, Collection<Object>> protected QuadFunction<A,B, C, Score_, ConstraintJustification> @NonNull TriConstraintBuilder<A,B, C, Score_> indictWith(@NonNull TriFunction<A, B, C, Collection<Object>> indictedObjectsMapping) Sets a custom function to mark any object returned by it as responsible for causing the constraint to match.<ConstraintJustification_ extends ConstraintJustification>
@NonNull TriConstraintBuilder<A,B, C, Score_> justifyWith(@NonNull QuadFunction<A, B, C, Score_, ConstraintJustification_> justificationMapping) Sets a custom function to apply on a constraint match to justify it.Methods inherited from class ai.timefold.solver.core.impl.score.stream.common.AbstractConstraintBuilder
asConstraint, asConstraintDescribedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ai.timefold.solver.core.api.score.stream.ConstraintBuilder
asConstraint, asConstraint, asConstraintDescribed, asConstraintDescribed
-
Constructor Details
-
TriConstraintBuilderImpl
public TriConstraintBuilderImpl(TriConstraintConstructor<A, B, C, Score_> constraintConstructor, ScoreImpactType impactType, Score_ constraintWeight)
-
-
Method Details
-
getJustificationMapping
- Specified by:
getJustificationMappingin classAbstractConstraintBuilder<Score_ extends Score<Score_>>
-
justifyWith
public <ConstraintJustification_ extends ConstraintJustification> @NonNull TriConstraintBuilder<A,B, justifyWithC, Score_> (@NonNull QuadFunction<A, B, C, Score_, ConstraintJustification_> justificationMapping) Description copied from interface:TriConstraintBuilderSets a custom function to apply on a constraint match to justify it.- Specified by:
justifyWithin interfaceTriConstraintBuilder<A,B, C, Score_ extends Score<Score_>> - Returns:
- this
- See Also:
-
getIndictedObjectsMapping
- Specified by:
getIndictedObjectsMappingin classAbstractConstraintBuilder<Score_ extends Score<Score_>>
-
indictWith
public @NonNull TriConstraintBuilder<A,B, indictWithC, Score_> (@NonNull TriFunction<A, B, C, Collection<Object>> indictedObjectsMapping) Description copied from interface:TriConstraintBuilderSets a custom function to mark any object returned by it as responsible for causing the constraint to match. Each object in the collection returned by this function will become anIndictmentand be available as a key inScoreExplanation.getIndictmentMap().- Specified by:
indictWithin interfaceTriConstraintBuilder<A,B, C, Score_ extends Score<Score_>> - Returns:
- this
-