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 theScoreof aPlanningSolution, from the opposite side thanConstraintMatchTotal. Retrievable fromScoreExplanation.getIndictmentMap().
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default intgetConstraintMatchCount()Set<ConstraintMatch<Score_>>getConstraintMatchSet()<IndictedObject_>
IndictedObject_getIndictedObject()The object that was involved in causing the constraints to match.default ObjectgetJustification()Deprecated, for removal: This API element is subject to removal in a future version.PrefergetIndictedObject().List<ConstraintJustification>getJustificationList()RetrieveConstraintJustificationinstances associated withConstraintMatches ingetConstraintMatchSet().default <ConstraintJustification_ extends ConstraintJustification>
List<ConstraintJustification_>getJustificationList(Class<ConstraintJustification_> justificationClass)RetrieveConstraintJustificationinstances associated withConstraintMatches ingetConstraintMatchSet(), which are of (or extend) a given constraint justification implementation.Score_getScore()Sum of thegetConstraintMatchSet()'sConstraintMatch.getScore().
-
-
-
Method Detail
-
getJustification
@Deprecated(forRemoval=true) default Object 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_> 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.- Returns:
- never null
-
getConstraintMatchSet
Set<ConstraintMatch<Score_>> getConstraintMatchSet()
- Returns:
- never null
-
getConstraintMatchCount
default int getConstraintMatchCount()
- Returns:
>= 0
-
getJustificationList
List<ConstraintJustification> getJustificationList()
RetrieveConstraintJustificationinstances associated withConstraintMatches ingetConstraintMatchSet(). This is equivalent to retrievinggetConstraintMatchSet()and collecting allConstraintMatch.getJustification()objects into a list.- Returns:
- never null, guaranteed to contain unique instances
-
getJustificationList
default <ConstraintJustification_ extends ConstraintJustification> 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:
- never null, guaranteed to contain unique instances
-
getScore
Score_ getScore()
Sum of thegetConstraintMatchSet()'sConstraintMatch.getScore().- Returns:
- never null
-
-