Interface QuadConstraintBuilder<A,B,C,D,Score_ extends Score<Score_>>
- All Superinterfaces:
ConstraintBuilder
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
(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>
QuadConstraintBuilder<A,B, C, D, Score_> justifyWith
(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 org.optaplanner.core.api.score.stream.ConstraintBuilder
asConstraint, asConstraint
-
Method Details
-
justifyWith
<ConstraintJustification_ extends ConstraintJustification> QuadConstraintBuilder<A,B, justifyWithC, D, Score_> (PentaFunction<A, B, C, D, Score_, ConstraintJustification_> justificationMapping) Sets a custom function to apply on a constraint match to justify it.- Parameters:
justificationMapping
- never null- Returns:
- this
- See Also:
-
indictWith
QuadConstraintBuilder<A,B, indictWithC, D, Score_> (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 anIndictment
and be available as a key inScoreExplanation.getIndictmentMap()
.- Parameters:
indictedObjectsMapping
- never null- Returns:
- this
-