net.groboclown.util.states.v1
Class Stateful
java.lang.Object
|
+--net.groboclown.util.states.v1.Stateful
- public class Stateful
- extends Object
- Version:
- 0.9.0 Alpha
- Author:
- Matt Albrecht
Constructor Summary |
Stateful(net.groboclown.util.states.v1.IStatefulListener listener)
Default Constructor |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
listener
private net.groboclown.util.states.v1.IStatefulListener listener
category
private StateCategory category
actions
private Object[] actions
currentState
private int currentState
currentAction
private Object currentAction
Stateful
public Stateful(net.groboclown.util.states.v1.IStatefulListener listener)
- Default Constructor
addStateAction
public void addStateAction(State s,
Object action)
removeStateAction
public void removeStateAction(State s)
setState
public void setState(State s)
- Only calls the listener's setAction if the new state is different
than the current state, and the new state's action object is
different than the current action object.
initialize
protected void initialize(StateCategory s)
Written under the LGPL