Interface QuadConstraintBuilder<A,B,C,D,Score_ extends Score<Score_>>
- All Superinterfaces:
ConstraintBuilder
- All Known Implementing Classes:
QuadConstraintBuilderImpl
public interface QuadConstraintBuilder<A,B,C,D,Score_ extends Score<Score_>>
extends ConstraintBuilder
Used to build a
Constraint out of a QuadConstraintStream, applying optional configuration.
To build the constraint, use one of the terminal operations, such as ConstraintBuilder.asConstraint(String).
Unless justifyWith(PentaFunction) is called, the default justification mapping will be used.
The function takes the input arguments and converts them into a List.
Unless indictWith(QuadFunction) is called, the default indicted objects' mapping will be used.
The function takes the input arguments and converts them into a List.
-
Method Summary
Modifier and TypeMethodDescriptionindictWith(@NonNull QuadFunction<A, B, C, D, 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 QuadConstraintBuilder<A,B, C, D, Score_> justifyWith(@NonNull PentaFunction<A, B, C, D, Score_, ConstraintJustification_> justificationMapping) Sets a custom function to apply on a constraint match to justify it.Methods inherited from interface ai.timefold.solver.core.api.score.stream.ConstraintBuilder
asConstraint, asConstraint, asConstraintDescribed, asConstraintDescribed
-
Method Details
-
justifyWith
<ConstraintJustification_ extends ConstraintJustification> @NonNull QuadConstraintBuilder<A,B, justifyWithC, D, Score_> (@NonNull PentaFunction<A, B, C, D, Score_, ConstraintJustification_> justificationMapping) Sets a custom function to apply on a constraint match to justify it.- Returns:
- this
- See Also:
-
indictWith
@NonNull QuadConstraintBuilder<A,B, indictWithC, D, Score_> (@NonNull QuadFunction<A, B, C, D, Collection<Object>> indictedObjectsMapping) Sets 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().- Returns:
- this
-