Interface TriConstraintBuilder<A,B,C,Score_ extends Score<Score_>>
- All Superinterfaces:
ConstraintBuilder
- All Known Implementing Classes:
TriConstraintBuilderImpl
Used to build a
Constraint out of a TriConstraintStream, applying optional configuration.
To build the constraint, use one of the terminal operations, such as ConstraintBuilder.asConstraint(String).
Unless justifyWith(QuadFunction) is called, the default justification mapping will be used.
The function takes the input arguments and converts them into a List.
Unless indictWith(TriFunction) 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 TypeMethodDescription@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 interface ai.timefold.solver.core.api.score.stream.ConstraintBuilder
asConstraint, asConstraint, asConstraintDescribed, asConstraintDescribed
-
Method Details
-
justifyWith
<ConstraintJustification_ extends ConstraintJustification> @NonNull TriConstraintBuilder<A,B, justifyWithC, Score_> (@NonNull QuadFunction<A, B, C, Score_, ConstraintJustification_> justificationMapping) Sets a custom function to apply on a constraint match to justify it.- Returns:
- this
- See Also:
-
indictWith
@NonNull TriConstraintBuilder<A,B, indictWithC, Score_> (@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. Each object in the collection returned by this function will become anIndictmentand be available as a key inScoreExplanation.getIndictmentMap().- Returns:
- this
-