Package org.optaplanner.core.api.score.constraint

## Interface ConstraintMatchTotal<Score_ extends Score<Score_>>

- Type Parameters:
    `Score_` - the actual score type
  All Known Implementing Classes:
    `DefaultConstraintMatchTotal`

      public interface ConstraintMatchTotal<Score_ extends Score<Score_>>

  Explains the `Score` of a `PlanningSolution`, from the opposite side than `Indictment`. Retrievable from `ScoreExplanation.getConstraintMatchTotalMap()`.

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static String` | `composeConstraintId​(String constraintPackage, String constraintName)` |
    `String` | `getConstraintId()` | To create a constraintId, use `composeConstraintId(String, String)`.
    `default int` | `getConstraintMatchCount()` |
    `Set<ConstraintMatch<Score_>>` | `getConstraintMatchSet()` |
    `String` | `getConstraintName()` |
    `String` | `getConstraintPackage()` |
    `Score_` | `getConstraintWeight()` | The value of the `ConstraintWeight` annotated member of the `ConstraintConfiguration`.
    `Score_` | `getScore()` | Sum of the `getConstraintMatchSet()`'s `ConstraintMatch.getScore()`.

- - ### Method Detail

    - #### composeConstraintId

          static String composeConstraintId​(String constraintPackage,
                                            String constraintName)

      Parameters:
        `constraintPackage` - never null
        `constraintName` - never null
      Returns:
        never null

    - #### getConstraintPackage

          String getConstraintPackage()

      Returns:
        never null

    - #### getConstraintName

          String getConstraintName()

      Returns:
        never null

    - #### getConstraintWeight

          Score_ getConstraintWeight()

      The value of the `ConstraintWeight` annotated member of the `ConstraintConfiguration`. It's independent to the state of the `planning variables`. Do not confuse with `getScore()`.
      Returns:
        null if `ConstraintWeight` isn't used for this constraint

    - #### getConstraintMatchSet

          Set<ConstraintMatch<Score_>> getConstraintMatchSet()

      Returns:
        never null

    - #### getConstraintMatchCount

          default int getConstraintMatchCount()

      Returns:
        `>= 0`

    - #### getScore

          Score_ getScore()

      Sum of the `getConstraintMatchSet()`'s `ConstraintMatch.getScore()`.
      Returns:
        never null

    - #### getConstraintId

          String getConstraintId()

      To create a constraintId, use `composeConstraintId(String, String)`.
      Returns:
        never null