org.optaplanner.core.impl.phase.custom

## Class NoChangeCustomPhaseCommand

- java.lang.Object
- - org.optaplanner.core.impl.phase.custom.AbstractCustomPhaseCommand<Object>
  - - org.optaplanner.core.impl.phase.custom.NoChangeCustomPhaseCommand

- All Implemented Interfaces:
    CustomPhaseCommand<Object>

      public class NoChangeCustomPhaseCommand
      extends AbstractCustomPhaseCommand<Object>

  Makes no changes.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NoChangeCustomPhaseCommand()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `changeWorkingSolution(ScoreDirector<Object> scoreDirector)` Changes `working solution` of `ScoreDirector.getWorkingSolution()`.

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

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

- - ### Constructor Detail

    - #### NoChangeCustomPhaseCommand

          public NoChangeCustomPhaseCommand()

  - ### Method Detail

    - #### changeWorkingSolution

          public void changeWorkingSolution(ScoreDirector<Object> scoreDirector)

      Description copied from interface: `CustomPhaseCommand`
      Changes `working solution` of `ScoreDirector.getWorkingSolution()`. When the `working solution` is modified, the `ScoreDirector` must be correctly notified (through `ScoreDirector.beforeVariableChanged(Object, String)` and `ScoreDirector.afterVariableChanged(Object, String)`), otherwise calculated `Score`s will be corrupted.

      Don't forget to call `ScoreDirector.triggerVariableListeners()` after each set of changes (especially before every `ScoreDirector.calculateScore()` call) to ensure all shadow variables are updated.

      Parameters:
        `scoreDirector` - never null, the `ScoreDirector` that needs to get notified of the changes.

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