|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectframework.Move
public abstract class Move
This abstract class represents a move in a problem solving domain. It provides a constructor and accessor for a move's name, but extending classes must provide code for actually performing moves. Extending classes need not have an instance field for the move name, as it is inherited from this class. Extending classes must access the move name through this class's getMoveName() method.
Constructor Summary | |
---|---|
Move(java.lang.String moveName)
Creates a problem move, storing the move name. |
Method Summary | |
---|---|
abstract State |
doMove(State state)
Performs this move on a given state. |
java.lang.String |
getMoveName()
Accessor for this move's name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Move(java.lang.String moveName)
moveName
- the user command for this move.Method Detail |
---|
public abstract State doMove(State state)
state
- an existing state
public java.lang.String getMoveName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |