Class AbstractConstraint<Solution_,Constraint_ extends AbstractConstraint<Solution_,Constraint_,ConstraintFactory_>,ConstraintFactory_ extends InnerConstraintFactory<Solution_,Constraint_>>
java.lang.Object
ai.timefold.solver.constraint.streams.common.AbstractConstraint<Solution_,Constraint_,ConstraintFactory_>
- All Implemented Interfaces:
Constraint
- Direct Known Subclasses:
BavetConstraint
public abstract class AbstractConstraint<Solution_,Constraint_ extends AbstractConstraint<Solution_,Constraint_,ConstraintFactory_>,ConstraintFactory_ extends InnerConstraintFactory<Solution_,Constraint_>>
extends Object
implements Constraint
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractConstraint(ConstraintFactory_ constraintFactory, ConstraintRef constraintRef, Function<Solution_, Score<?>> constraintWeightExtractor, ScoreImpactType scoreImpactType, boolean isConstraintWeightConfigurable, Object justificationMapping, Object indictedObjectsMapping) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidassertCorrectImpact(int impact) final voidassertCorrectImpact(long impact) final voidassertCorrectImpact(BigDecimal impact) final <Score_ extends Score<Score_>>
Score_extractConstraintWeight(Solution_ workingSolution) final ConstraintFactory_<IndictedObjectsMapping_>
IndictedObjectsMapping_<JustificationMapping_>
JustificationMapping_final ScoreImpactTypeMethods 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.Constraint
getConstraintId, getConstraintName, getConstraintPackage
-
Constructor Details
-
AbstractConstraint
protected AbstractConstraint(ConstraintFactory_ constraintFactory, ConstraintRef constraintRef, Function<Solution_, Score<?>> constraintWeightExtractor, ScoreImpactType scoreImpactType, boolean isConstraintWeightConfigurable, Object justificationMapping, Object indictedObjectsMapping)
-
-
Method Details
-
extractConstraintWeight
-
assertCorrectImpact
public final void assertCorrectImpact(int impact) -
assertCorrectImpact
public final void assertCorrectImpact(long impact) -
assertCorrectImpact
-
getConstraintFactory
- Specified by:
getConstraintFactoryin interfaceConstraint
-
getConstraintRef
- Specified by:
getConstraintRefin interfaceConstraint
-
getScoreImpactType
-
getJustificationMapping
public <JustificationMapping_> JustificationMapping_ getJustificationMapping() -
getIndictedObjectsMapping
public <IndictedObjectsMapping_> IndictedObjectsMapping_ getIndictedObjectsMapping()
-