public class NoChangeCustomPhaseCommand extends AbstractCustomPhaseCommand<Object>
Constructor and Description |
---|
NoChangeCustomPhaseCommand() |
Modifier and Type | Method and Description |
---|---|
void |
changeWorkingSolution(ScoreDirector<Object> scoreDirector)
Changes
working solution of ScoreDirector.getWorkingSolution() . |
public void changeWorkingSolution(ScoreDirector<Object> scoreDirector)
CustomPhaseCommand
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.
scoreDirector
- never null, the ScoreDirector
that needs to get notified of the changes.Copyright © 2006–2019 JBoss by Red Hat. All rights reserved.