|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectframework.Problem
public abstract class Problem
This abstract class represents a problem in a problem solving domain. Note that this class does not provide a constructor. It provides getters and setters for the current state of the problem, the list of moves for the problem, and the problem's introduction string. Extending classes need not have instance fields for these attributes, as they are inherited from this class. Extending classes must set these values in their constructors using the setters (mutators) provided in this class. Extending classes must also override the abstract success method.
Constructor Summary | |
---|---|
Problem()
|
Method Summary | |
---|---|
State |
getCurrentState()
Gets the current state of the problem. |
java.lang.String |
getIntroduction()
Gets an explanatory introduction string for the problem. |
java.util.List<Move> |
getMoves()
Gets the list of moves for this problem. |
void |
setCurrentState(State currentState)
Sets the current state of the problem. |
void |
setIntroduction(java.lang.String introduction)
Sets the introduction string for this problem. |
void |
setMoves(java.util.List<Move> moves)
Sets the list of moves for this problem. |
abstract boolean |
success()
Determines whether the current state of this problem is a success. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Problem()
Method Detail |
---|
public abstract boolean success()
public State getCurrentState()
public void setCurrentState(State currentState)
currentState
- the current statepublic java.lang.String getIntroduction()
public void setIntroduction(java.lang.String introduction)
introduction
- the introduction stringpublic java.util.List<Move> getMoves()
public void setMoves(java.util.List<Move> moves)
moves
- the list of moves
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |