Solution_
- the solution type, the class with the PlanningSolution
annotationpublic abstract class AbstractMove<Solution_> extends Object implements Move<Solution_>
Move
.Move
Constructor and Description |
---|
AbstractMove() |
Modifier and Type | Method and Description |
---|---|
void |
doMove(ScoreDirector<Solution_> scoreDirector)
Does the move (which indirectly affects the
ScoreDirector.getWorkingSolution() ). |
protected abstract void |
doMoveOnGenuineVariables(ScoreDirector<Solution_> 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<Solution_>
public final void doMove(ScoreDirector<Solution_> scoreDirector)
Move
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 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<Solution_>
scoreDirector
- never null, the ScoreDirector
that needs to get notified of the changes.protected abstract void doMoveOnGenuineVariables(ScoreDirector<Solution_> scoreDirector)
doMove(ScoreDirector)
but without the ScoreDirector.triggerVariableListeners()
call
(because doMove(ScoreDirector)
already does that).scoreDirector
- never nullCopyright © 2006–2017 JBoss by Red Hat. All rights reserved.