| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.drools.planner.core.move.CompositeMove
public class CompositeMove
A CompositeMove is composed out of multiple other moves.
Warning: one of the moveList moves should not rely on the effect on of a previous moveList move to create an uncorrupted undoMove. In other words,
Move| Field Summary | |
|---|---|
protected  List<Move> | 
moveList
 | 
| Constructor Summary | |
|---|---|
CompositeMove(List<Move> moveList)
 | 
|
| Method Summary | |
|---|---|
 Move | 
createUndoMove(org.drools.WorkingMemory workingMemory)
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(org.drools.WorkingMemory workingMemory)
Does the Move and updates the Solution and its WorkingMemory accordingly. | 
 boolean | 
equals(Object o)
 | 
 List<Move> | 
getMoveList()
 | 
 Collection<? extends Object> | 
getTabuProperties()
The returned Collection should a stable order.  | 
 int | 
hashCode()
 | 
 boolean | 
isMoveDoable(org.drools.WorkingMemory workingMemory)
Called before a move is evaluated to decide whether the move can be done and evaluated.  | 
 String | 
toString()
 | 
| Methods inherited from class java.lang.Object | 
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
protected List<Move> moveList
| Constructor Detail | 
|---|
public CompositeMove(List<Move> moveList)
moveList - cannot be null| Method Detail | 
|---|
public List<Move> getMoveList()
public boolean isMoveDoable(org.drools.WorkingMemory workingMemory)
MoveMoveFactory,
 this is not needed as the Solver will do it for you.
isMoveDoable in interface MoveworkingMemory - the WorkingMemory not yet modified by the move.
public Move createUndoMove(org.drools.WorkingMemory workingMemory)
Move
createUndoMove in interface MoveworkingMemory - the WorkingMemory not yet modified by the move.
public void doMove(org.drools.WorkingMemory workingMemory)
MoveSolution and its WorkingMemory accordingly.
 When the solution is modified, the WorkingMemory's FactHandles should be correctly notified,
 otherwise the score(s) calculated will be corrupted.
doMove in interface MoveworkingMemory - never null, the WorkingMemory that needs to get notified of the changes.public Collection<? extends Object> getTabuProperties()
TabuPropertyEnabledList or LinkedHashSet, but not HashSet.
 Duplicates entries in the returned Collection are best avoided.
getTabuProperties in interface TabuPropertyEnabledpublic boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||