public abstract class AbstractMove extends Object implements Move
Move
.Move
Constructor and Description |
---|
AbstractMove() |
Modifier and Type | Method and Description |
---|---|
void |
doMove(ScoreDirector scoreDirector)
Does the move (which indirectly affects the
ScoreDirector.getWorkingSolution() ). |
protected abstract void |
doMoveOnGenuineVariables(ScoreDirector scoreDirector)
Like
doMove(ScoreDirector) but without the ScoreDirector.triggerVariableListeners() call
(because doMove(ScoreDirector) already does that). |
String |
getSimpleMoveTypeDescription()
Describes the move type for statistical purposes.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createUndoMove, getPlanningEntities, getPlanningValues, isMoveDoable
public String getSimpleMoveTypeDescription()
Move
The format is not formalized. Never parse the String
returned by this method.
getSimpleMoveTypeDescription
in interface Move
public final void doMove(ScoreDirector scoreDirector)
Move
ScoreDirector.getWorkingSolution()
).
When the workingSolution
is modified, the ScoreDirector
must be correctly notified
(through ScoreDirector.beforeVariableChanged(Object, String)
,
ScoreDirector.afterProblemFactChanged(Object)
, etc),
otherwise later calculated Score
s will be corrupted.
This method must end with calling ScoreDirector.triggerVariableListeners()
to ensure all shadow variables are updated.
doMove
in interface Move
scoreDirector
- never null, the ScoreDirector
that needs to get notified of the changes.protected abstract void doMoveOnGenuineVariables(ScoreDirector scoreDirector)
doMove(ScoreDirector)
but without the ScoreDirector.triggerVariableListeners()
call
(because doMove(ScoreDirector)
already does that).scoreDirector
- never nullCopyright © 2006–2016 JBoss by Red Hat. All rights reserved.