Class DefaultIndictment<Score_ extends Score<Score_>>
java.lang.Object
ai.timefold.solver.core.impl.score.constraint.DefaultIndictment<Score_>
- All Implemented Interfaces:
Indictment<Score_>
public final class DefaultIndictment<Score_ extends Score<Score_>>
extends Object
implements Indictment<Score_>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConstraintMatch(ConstraintMatch<Score_> constraintMatch) booleanaddConstraintMatchWithoutFail(ConstraintMatch<Score_> constraintMatch) boolean@NonNull Set<ConstraintMatch<Score_>><IndictedObject_>
@NonNull IndictedObject_The object that was involved in causing the constraints to match.@NonNull List<ConstraintJustification>RetrieveConstraintJustificationinstances associated withConstraintMatches inIndictment.getConstraintMatchSet().@NonNull Score_getScore()Sum of theIndictment.getConstraintMatchSet()'sConstraintMatch.getScore().inthashCode()voidremoveConstraintMatch(ConstraintMatch<Score_> constraintMatch) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ai.timefold.solver.core.api.score.constraint.Indictment
getConstraintMatchCount, getJustification, getJustificationList
-
Constructor Details
-
DefaultIndictment
-
-
Method Details
-
getIndictedObject
public <IndictedObject_> @NonNull IndictedObject_ getIndictedObject()Description copied from interface:IndictmentThe object that was involved in causing the constraints to match. It is part ofConstraintMatch.getIndictedObjectList()of everyConstraintMatchreturned byIndictment.getConstraintMatchSet().- Specified by:
getIndictedObjectin interfaceIndictment<Score_ extends Score<Score_>>- Type Parameters:
IndictedObject_- Shorthand so that the user does not need to cast in user code.
-
getConstraintMatchSet
- Specified by:
getConstraintMatchSetin interfaceIndictment<Score_ extends Score<Score_>>
-
getJustificationList
Description copied from interface:IndictmentRetrieveConstraintJustificationinstances associated withConstraintMatches inIndictment.getConstraintMatchSet(). This is equivalent to retrievingIndictment.getConstraintMatchSet()and collecting allConstraintMatch.getJustification()objects into a list.- Specified by:
getJustificationListin interfaceIndictment<Score_ extends Score<Score_>>- Returns:
- guaranteed to contain unique instances
-
getScore
Description copied from interface:IndictmentSum of theIndictment.getConstraintMatchSet()'sConstraintMatch.getScore().- Specified by:
getScorein interfaceIndictment<Score_ extends Score<Score_>>
-
addConstraintMatch
-
addConstraintMatchWithoutFail
-
removeConstraintMatch
-
equals
-
hashCode
public int hashCode() -
toString
-