org.optaplanner.core.api.score.constraint

## Class Indictment

- java.lang.Object
- - org.optaplanner.core.api.score.constraint.Indictment

- All Implemented Interfaces:
    Serializable, Comparable<Indictment>

      public final class Indictment
      extends Object
      implements Serializable, Comparable<Indictment>

  Explains the `Score` of a `PlanningSolution`, from the opposite side than `ConstraintMatchTotal`. Retrievable from `ScoreDirector.getIndictmentMap()`.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Indictment(Object justification, Score zeroScore)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addConstraintMatch(ConstraintMatch constraintMatch)`
    `int` | `compareTo(Indictment other)`
    `boolean` | `equals(Object o)`
    `int` | `getConstraintMatchCount()`
    `Set<ConstraintMatch>` | `getConstraintMatchSet()`
    `Object` | `getJustification()`
    `Score` | `getScore()` Sum of the `getConstraintMatchSet()`'s `ConstraintMatch.getScore()`.
    `Score` | `getScoreTotal()` Deprecated. in favor of `getScore()`
    `int` | `hashCode()`
    `void` | `removeConstraintMatch(ConstraintMatch constraintMatch)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Indictment

          public Indictment(Object justification,
                            Score zeroScore)

      Parameters:
        `justification` - never null
        `zeroScore` - never null

  - ### Method Detail

    - #### getJustification

          public Object getJustification()

      Returns:
        never null

    - #### getConstraintMatchSet

          public Set<ConstraintMatch> getConstraintMatchSet()

      Returns:
        never null

    - #### getConstraintMatchCount

          public int getConstraintMatchCount()

      Returns:
        `>= 0`

    - #### getScore

          public Score getScore()

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

    - #### getScoreTotal

          @Deprecated
          public Score getScoreTotal()

      Deprecated. in favor of `getScore()`
      Returns:
        never null

    - #### addConstraintMatch

          public void addConstraintMatch(ConstraintMatch constraintMatch)

    - #### removeConstraintMatch

          public void removeConstraintMatch(ConstraintMatch constraintMatch)

    - #### compareTo

          public int compareTo(Indictment other)

      Specified by:
        `compareTo` in interface `Comparable<Indictment>`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2006–2021 JBoss by Red Hat. All rights reserved.