Save This Page
Home » jboss-5.0.0.CR1-src » org » jboss » util » state » [javadoc | source]
org.jboss.util.state
public class: DefaultStateMachineModel [javadoc | source]
java.lang.Object
   org.jboss.util.CloneableObject
      org.jboss.util.state.DefaultStateMachineModel

All Implemented Interfaces:
    Model, Appendable, Serializable, Cloneable

A default implementation of a state machine model.

Accepting to acceptable state mappings are backed up by a HashMap and HashSets.

Implements clonable so that the model can be used as a prototype. Nested containers are cloned, so that changes will not effect the master or other clones.

Nested Class Summary:
protected static class  DefaultStateMachineModel.Entry  A container for entiries in the state acceptable map. 
Field Summary
protected  Map acceptingMap    The mapping from State to Entry. 
protected  DefaultStateMachineModel.Entry initial    The mapping entry for the initial state. 
protected  DefaultStateMachineModel.Entry current    The mapping entry for the current state. 
Constructor:
 public DefaultStateMachineModel() 
Method from org.jboss.util.state.DefaultStateMachineModel Summary:
acceptableStates,   addState,   addState,   addState,   addState,   appendPrettyString,   clear,   clone,   containsState,   equals,   getCurrentState,   getEntry,   getInitialState,   getMappedState,   isMappedState,   putEntry,   removeState,   setCurrentState,   setInitialState,   states,   toString,   updateAcceptableMapping
Methods from org.jboss.util.CloneableObject:
clone
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.util.state.DefaultStateMachineModel Detail:
 public Set acceptableStates(State state) 
 public Set addState(State state) 
 public Set addState(State state,
    Set acceptable) 
 public Set addState(State state,
    State[] acceptable) 
 public Set addState(State state,
    State acceptable) 
 public StringBuffer appendPrettyString(StringBuffer buff,
    String prefix) 
 public  void clear() 
 public Object clone() 
 public boolean containsState(State state) 
 public boolean equals(Object obj) 
 public State getCurrentState() 
 protected DefaultStateMachineModel.Entry getEntry(State state) 
    Get an entry from the map.
 public State getInitialState() 
 public State getMappedState(State state) 
 public boolean isMappedState(State state) 
 protected DefaultStateMachineModel.Entry putEntry(State state,
    Set acceptable) 
    Put a new entry into the map.
 public Set removeState(State state) 
 public  void setCurrentState(State state) 
 public  void setInitialState(State state) 
 public Set states() 
 public String toString() 
 protected  void updateAcceptableMapping(State state,
    boolean remove) 
    Update acceptable mappings.