Class BiConstraintBuilderImpl<A,B,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.bi.BiConstraintBuilderImpl<A,B,Score_>
- All Implemented Interfaces:
BiConstraintBuilder<A,,B, Score_> ConstraintBuilder
public final class BiConstraintBuilderImpl<A,B,Score_ extends Score<Score_>>
extends AbstractConstraintBuilder<Score_>
implements BiConstraintBuilder<A,B,Score_>
-
Constructor Summary
ConstructorsConstructorDescriptionBiConstraintBuilderImpl(BiConstraintConstructor<A, B, Score_> constraintConstructor, ScoreImpactType impactType, Score_ constraintWeight) -
Method Summary
Modifier and TypeMethodDescriptionprotected BiFunction<A,B, Collection<Object>> protected TriFunction<A,B, Score_, ConstraintJustification> @NonNull BiConstraintBuilder<A,B, Score_> indictWith(@NonNull BiFunction<A, B, 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 BiConstraintBuilder<A,B, Score_> justifyWith(@NonNull TriFunction<A, B, 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
-
BiConstraintBuilderImpl
public BiConstraintBuilderImpl(BiConstraintConstructor<A, B, Score_> constraintConstructor, ScoreImpactType impactType, Score_ constraintWeight)
-
-
Method Details
-
getJustificationMapping
- Specified by:
getJustificationMappingin classAbstractConstraintBuilder<Score_ extends Score<Score_>>
-
justifyWith
public <ConstraintJustification_ extends ConstraintJustification> @NonNull BiConstraintBuilder<A,B, justifyWithScore_> (@NonNull TriFunction<A, B, Score_, ConstraintJustification_> justificationMapping) Description copied from interface:BiConstraintBuilderSets a custom function to apply on a constraint match to justify it.- Specified by:
justifyWithin interfaceBiConstraintBuilder<A,B, Score_ extends Score<Score_>> - Returns:
- this
- See Also:
-
getIndictedObjectsMapping
- Specified by:
getIndictedObjectsMappingin classAbstractConstraintBuilder<Score_ extends Score<Score_>>
-
indictWith
public @NonNull BiConstraintBuilder<A,B, indictWithScore_> (@NonNull BiFunction<A, B, Collection<Object>> indictedObjectsMapping) Description copied from interface:BiConstraintBuilderSets 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 interfaceBiConstraintBuilder<A,B, Score_ extends Score<Score_>> - Returns:
- this
-