Interface Indictment<Score_ extends Score<Score_>>
- Type Parameters:
Score_- the actual score type
- All Known Implementing Classes:
DefaultIndictment
public interface Indictment<Score_ extends Score<Score_>>
Explains the
Score of a PlanningSolution, from the opposite side than ConstraintMatchTotal.
Retrievable from ScoreExplanation.getIndictmentMap().-
Method Summary
Modifier and TypeMethodDescriptiondefault int@NonNull Set<ConstraintMatch<Score_>><IndictedObject_>
@NonNull IndictedObject_The object that was involved in causing the constraints to match.default ObjectDeprecated, for removal: This API element is subject to removal in a future version.@NonNull List<ConstraintJustification>RetrieveConstraintJustificationinstances associated withConstraintMatches ingetConstraintMatchSet().default <ConstraintJustification_ extends ConstraintJustification>
@NonNull List<ConstraintJustification_>getJustificationList(Class<ConstraintJustification_> justificationClass) RetrieveConstraintJustificationinstances associated withConstraintMatches ingetConstraintMatchSet(), which are of (or extend) a given constraint justification implementation.@NonNull Score_getScore()Sum of thegetConstraintMatchSet()'sConstraintMatch.getScore().
-
Method Details
-
getJustification
Deprecated, for removal: This API element is subject to removal in a future version.PrefergetIndictedObject().As defined bygetIndictedObject().This is a poorly named legacy method, which does not in fact return a justification, but an indicted object. Each indictment may have multiple justifications, and they are accessed by
getJustificationList().- Returns:
- never null
-
getIndictedObject
<IndictedObject_> @NonNull IndictedObject_ getIndictedObject()The object that was involved in causing the constraints to match. It is part ofConstraintMatch.getIndictedObjectList()of everyConstraintMatchreturned bygetConstraintMatchSet().- Type Parameters:
IndictedObject_- Shorthand so that the user does not need to cast in user code.
-
getConstraintMatchSet
@NonNull Set<ConstraintMatch<Score_>> getConstraintMatchSet() -
getConstraintMatchCount
default int getConstraintMatchCount()- Returns:
>= 0
-
getJustificationList
@NonNull List<ConstraintJustification> getJustificationList()RetrieveConstraintJustificationinstances associated withConstraintMatches ingetConstraintMatchSet(). This is equivalent to retrievinggetConstraintMatchSet()and collecting allConstraintMatch.getJustification()objects into a list.- Returns:
- guaranteed to contain unique instances
-
getJustificationList
default <ConstraintJustification_ extends ConstraintJustification> @NonNull List<ConstraintJustification_> getJustificationList(Class<ConstraintJustification_> justificationClass) RetrieveConstraintJustificationinstances associated withConstraintMatches ingetConstraintMatchSet(), which are of (or extend) a given constraint justification implementation. This is equivalent to retrievinggetConstraintMatchSet()and collecting all matchingConstraintMatch.getJustification()objects into a list.- Returns:
- guaranteed to contain unique instances
-
getScore
@NonNull Score_ getScore()Sum of thegetConstraintMatchSet()'sConstraintMatch.getScore().
-
getIndictedObject().