|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jzeno.model.AbstractStateManager
public abstract class AbstractStateManager
Constructor Summary | |
---|---|
protected |
AbstractStateManager()
|
Method Summary | |
---|---|
protected void |
addState(java.lang.Object sourceState,
java.lang.Object[] targetStates)
This operation is used to add a state to the state manager. |
java.util.List |
getAllowedTargetStates(java.lang.Object oldStatus)
Return a list of allowed target states for the given source state. |
protected abstract void |
initialize()
Operation that initializes the states and state transitions; Must be implemented by subclasses. |
boolean |
isAllowedTransition(java.lang.Object oldStatus,
java.lang.Object newStatus)
This operation checks wether or not a certain state transition is allowed. |
boolean |
isEnabled()
|
void |
setEnabled(boolean b)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.jzeno.model.StateManager |
---|
getStateClass, getStatePropertyName |
Constructor Detail |
---|
protected AbstractStateManager()
Method Detail |
---|
protected abstract void initialize()
Operation that initializes the states and state transitions; Must be implemented by subclasses.
protected void addState(java.lang.Object sourceState, java.lang.Object[] targetStates)
This operation is used to add a state to the state manager. You have to specify the state object as source state, and all possible target states that can be reached from this source state. That way you specify the entire state transition diagram. The START state should be registered as sourceState == null. END states should be registered by adding null to the possible target states. States that are final, but don't allow deletion should be entered added with an empty list of target states.
public java.util.List getAllowedTargetStates(java.lang.Object oldStatus)
Return a list of allowed target states for the given source state.
getAllowedTargetStates
in interface StateManager
public boolean isEnabled()
isEnabled
in interface StateManager
public void setEnabled(boolean b)
setEnabled
in interface StateManager
public boolean isAllowedTransition(java.lang.Object oldStatus, java.lang.Object newStatus)
This operation checks wether or not a certain state transition is allowed.
isAllowedTransition
in interface StateManager
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |