Class NoChangeCustomPhaseCommand
- java.lang.Object
-
- org.optaplanner.core.impl.phase.custom.NoChangeCustomPhaseCommand
-
- All Implemented Interfaces:
CustomPhaseCommand<Object>
public class NoChangeCustomPhaseCommand extends Object implements CustomPhaseCommand<Object>
Makes no changes.
-
-
Constructor Summary
Constructors Constructor Description NoChangeCustomPhaseCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
changeWorkingSolution(ScoreDirector<Object> scoreDirector)
Changesworking solution
ofScoreDirector.getWorkingSolution()
.
-
-
-
Method Detail
-
changeWorkingSolution
public void changeWorkingSolution(ScoreDirector<Object> scoreDirector)
Description copied from interface:CustomPhaseCommand
Changesworking solution
ofScoreDirector.getWorkingSolution()
. When theworking solution
is modified, theScoreDirector
must be correctly notified (throughScoreDirector.beforeVariableChanged(Object, String)
andScoreDirector.afterVariableChanged(Object, String)
), otherwise calculatedScore
s will be corrupted.Don't forget to call
ScoreDirector.triggerVariableListeners()
after each set of changes (especially before everyInnerScoreDirector.calculateScore()
call) to ensure all shadow variables are updated.- Specified by:
changeWorkingSolution
in interfaceCustomPhaseCommand<Object>
- Parameters:
scoreDirector
- never null, theScoreDirector
that needs to get notified of the changes.
-
-