|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ObjectState
Title: Object State
Description: A stateful, single thread object, that can act upon itself
| Method Summary | |
|---|---|
double |
doAction(double currentScore,
double desparationValue)
Perform an action |
java.lang.Object |
getStateReference()
|
boolean |
isMaximiseScore()
If true, than a bigger score is better, otherwise a smaller score is better |
void |
restoreState(java.lang.Object stateReference)
Used to restore the state of the this object to that of a previous time point |
boolean |
undoAction()
Undo the last action (if it was successful) Users of an ObjectState should accept that sometimes undoing an action isn't possible. |
| Method Detail |
|---|
double doAction(double currentScore,
double desparationValue)
currentScore - The current score before doing the actiondesparationValue - An indication by the processing machines of willingness to do more extreme actions. A value of 0 means not desparate at all, a value of 1 means very desparate
boolean undoAction()
java.lang.Object getStateReference()
void restoreState(java.lang.Object stateReference)
stateReference - An object returned by getStateReference()boolean isMaximiseScore()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||