Package org.optaplanner.core.impl.score.director.easy

## Class EasyScoreDirector<Solution_,​Score_ extends Score<Score_>>

- java.lang.Object
- - org.optaplanner.core.impl.score.director.AbstractScoreDirector<Solution_,​Score_,​EasyScoreDirectorFactory<Solution_,​Score_>>
  - - org.optaplanner.core.impl.score.director.easy.EasyScoreDirector<Solution_,​Score_>

- Type Parameters:
    `Solution_` - the solution type, the class with the `PlanningSolution` annotation
    `Score_` - the score type to go with the solution
  All Implemented Interfaces:
    `AutoCloseable`, `Cloneable`, `ScoreDirector<Solution_>`, `InnerScoreDirector<Solution_,​Score_>`

      public class EasyScoreDirector<Solution_,​Score_ extends Score<Score_>>
      extends AbstractScoreDirector<Solution_,​Score_,​EasyScoreDirectorFactory<Solution_,​Score_>>

  Easy java implementation of `ScoreDirector`, which recalculates the `Score` of the `working solution` every time. This is non-incremental calculation, which is slow. This score director implementation does not support `ScoreExplanation.getConstraintMatchTotalMap()` and `ScoreExplanation.getIndictmentMap()`.
  See Also:
    `ScoreDirector`

- - ### Field Summary

    - ### Fields inherited from class org.optaplanner.core.impl.score.director.AbstractScoreDirector

      `allChangesWillBeUndoneBeforeStepEnds, calculationCount, constraintMatchEnabledPreference, logger, lookUpEnabled, lookUpManager, scoreDirectorFactory, variableListenerSupport, workingEntityListRevision, workingInitScore, workingSolution`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `EasyScoreDirector​(EasyScoreDirectorFactory<Solution_,​Score_> scoreDirectorFactory, boolean lookUpEnabled, boolean constraintMatchEnabledPreference, EasyScoreCalculator<Solution_,​Score_> easyScoreCalculator)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Score_` | `calculateScore()` | Calculates the `Score` and updates the `working solution` accordingly.
    `Map<String,​ConstraintMatchTotal<Score_>>` | `getConstraintMatchTotalMap()` | `ConstraintMatch`s are not supported by this `ScoreDirector` implementation.
    `EasyScoreCalculator<Solution_,​Score_>` | `getEasyScoreCalculator()` |
    `Map<Object,​Indictment<Score_>>` | `getIndictmentMap()` | `ConstraintMatch`s are not supported by this `ScoreDirector` implementation.
    `boolean` | `isConstraintMatchEnabled()` | Always false, `ConstraintMatchTotal`s are not supported by this `ScoreDirector` implementation.

    - ### Methods inherited from class org.optaplanner.core.impl.score.director.AbstractScoreDirector

      `afterEntityAdded, afterEntityAdded, afterEntityRemoved, afterEntityRemoved, afterProblemFactAdded, afterProblemFactRemoved, afterProblemPropertyChanged, afterVariableChanged, afterVariableChanged, assertExpectedUndoMoveScore, assertExpectedWorkingScore, assertNonNullPlanningIds, assertPredictedScoreFromScratch, assertShadowVariablesAreNotStale, assertWorkingScoreFromScratch, beforeEntityAdded, beforeEntityAdded, beforeEntityRemoved, beforeEntityRemoved, beforeProblemFactAdded, beforeProblemFactRemoved, beforeProblemPropertyChanged, beforeVariableChanged, beforeVariableChanged, buildScoreCorruptionAnalysis, buildShadowVariableAnalysis, changeVariableFacade, clone, cloneSolution, cloneWorkingSolution, close, createChildThreadScoreDirector, createShadowVariablesViolationMessage, doAndProcessMove, doAndProcessMove, getCalculationCount, getScoreDefinition, getScoreDirectorFactory, getSolutionDescriptor, getSupplyManager, getWorkingEntityCount, getWorkingEntityList, getWorkingEntityListRevision, getWorkingSolution, getWorkingValueCount, isAllChangesWillBeUndoneBeforeStepEnds, isConstraintMatchEnabledPreference, isLookUpEnabled, isWorkingEntityListDirty, lookUpWorkingObject, lookUpWorkingObjectOrReturnNull, overwriteConstraintMatchEnabledPreference, resetCalculationCount, setAllChangesWillBeUndoneBeforeStepEnds, setCalculatedScore, setWorkingEntityListDirty, setWorkingSolution, toString, triggerVariableListeners`

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

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### EasyScoreDirector

          public EasyScoreDirector​(EasyScoreDirectorFactory<Solution_,​Score_> scoreDirectorFactory,
                                   boolean lookUpEnabled,
                                   boolean constraintMatchEnabledPreference,
                                   EasyScoreCalculator<Solution_,​Score_> easyScoreCalculator)

  - ### Method Detail

    - #### getEasyScoreCalculator

          public EasyScoreCalculator<Solution_,​Score_> getEasyScoreCalculator()

    - #### calculateScore

          public Score_ calculateScore()

      Description copied from interface: `InnerScoreDirector`
      Calculates the `Score` and updates the `working solution` accordingly.
      Returns:
        never null, the `Score` of the `working solution`

    - #### isConstraintMatchEnabled

          public boolean isConstraintMatchEnabled()

      Always false, `ConstraintMatchTotal`s are not supported by this `ScoreDirector` implementation.
      Returns:
        false

    - #### getConstraintMatchTotalMap

          public Map<String,​ConstraintMatchTotal<Score_>> getConstraintMatchTotalMap()

      `ConstraintMatch`s are not supported by this `ScoreDirector` implementation.
      Returns:
        throws `IllegalStateException`
      Throws:
        `IllegalStateException` - always
      See Also:
        `InnerScoreDirector.getIndictmentMap()`

    - #### getIndictmentMap

          public Map<Object,​Indictment<Score_>> getIndictmentMap()

      `ConstraintMatch`s are not supported by this `ScoreDirector` implementation.
      Returns:
        throws `IllegalStateException`
      Throws:
        `IllegalStateException` - always
      See Also:
        `InnerScoreDirector.getConstraintMatchTotalMap()`