Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.0.0.CR4-Pre1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.optaplanner.core.impl.heuristic.selector.move.generic.chained
Class ChainedSwapMove

    java.lang.Object
      org.optaplanner.core.impl.heuristic.selector.move.generic.SwapMove
          org.optaplanner.core.impl.heuristic.selector.move.generic.chained.ChainedSwapMove

All Implemented Interfaces:
  Move

    public class ChainedSwapMove

extends SwapMove

Field Summary

Fields inherited from class org.optaplanner.core.impl.heuristic.selector.move.generic.SwapMove
`leftEntity, rightEntity, variableDescriptors`

Constructor Summary
`ChainedSwapMove(Collection<PlanningVariableDescriptor> variableDescriptors, Object leftEntity, Object rightEntity)`

Method Summary
`Move` | `createUndoMove(ScoreDirector scoreDirector)` Called before the move is done, so the move can be evaluated and then be undone without resulting into a permanent change in the solution.
`void` | `doMove(ScoreDirector scoreDirector)` Does the Move and updates the `Solution` and its `ScoreDirector` accordingly.

Methods inherited from class org.optaplanner.core.impl.heuristic.selector.move.generic.SwapMove
`equals, getLeftEntity, getPlanningEntities, getPlanningValues, getRightEntity, hashCode, isMoveDoable, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ChainedSwapMove

    public ChainedSwapMove(Collection<PlanningVariableDescriptor> variableDescriptors,
                           Object leftEntity,
                           Object rightEntity)

Method Detail

### createUndoMove

    public Move createUndoMove(ScoreDirector scoreDirector)

  Description copied from interface: `Move`
  Called before the move is done, so the move can be evaluated and then be undone without resulting into a permanent change in the solution.

  Specified by:
    `createUndoMove` in interface `Move`
  Overrides:
    `createUndoMove` in class `SwapMove`
  Parameters:
    `scoreDirector` - the `ScoreDirector` not yet modified by the move.
  Returns:
    an undoMove which does the exact opposite of this move.

### doMove

    public void doMove(ScoreDirector scoreDirector)

  Description copied from interface: `Move`
  Does the Move and updates the `Solution` and its `ScoreDirector` accordingly. When the `Solution` is modified, the `ScoreDirector` should be correctly notified, otherwise later calculated `Score`s can be corrupted.

  Specified by:
    `doMove` in interface `Move`
  Overrides:
    `doMove` in class `SwapMove`
  Parameters:
    `scoreDirector` - never null, the `ScoreDirector` that needs to get notified of the changes.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.0.0.CR4-Pre1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2013 JBoss by Red Hat. All Rights Reserved.