All Packages Class Hierarchy This Package Previous Next Index
Class bvyy.smf.StateMachine
java.lang.Object
|
+----bvyy.smf.StateMachine
- public abstract class StateMachine
- extends Object
- implements Serializable, StateChangeListener
This is the class that allows a state change command to be created and then
processed.
Intent
To allow the functioning of a state machine to appear as if it is just one
class. This hides the internal represnetation of the state machine.
Motivation
I am not sure of the precise implementation of the state machine. This
allows the interface to be defined, but the implementation to vary. For
instance there is already a class for a linear state machine as opposed
to a meshed-state state-machine.
- Version:
- 1.0.2 24 May 1998
- Author:
- (c)1998 Brian Voon Yee Yap
-
changes
-
-
modifies
-
-
myName
-
-
vetos
-
-
StateMachine()
- The default constructor for this bean.
-
StateMachine(StringTokenizer)
- Construct a state machine.
-
addModifiableChangeListener(ModifiableChangeListener)
- Add a ModifiableListener to the listener list.
-
addPropertyChangeListener(PropertyChangeListener)
- Add a PropertyChangeListener to the listener list.
-
addVetoableChangeListener(VetoableChangeListener)
- Add a VetoableListener to the listener list.
-
fireStateChange(ModifiableChangeEvent)
- Change the state from the current state to a new state.
-
getName()
- Get the name of this state machine.
-
getState()
- Returns the current state of the state machine.
-
getStateTransitions()
- Gets the states that can be reached from the current state.
-
removeModifiableChangeListener(ModifiableChangeListener)
- Remove a ModifiableChangeListener from the listener list.
-
removePropertyChangeListener(PropertyChangeListener)
- Remove a PropertyChangeListener from the listener list.
-
removeVetoableChangeListener(VetoableChangeListener)
- Remove a VetoableChangeListener from the listener list.
-
setName(String)
- Set the name of this state machine.
changes
protected PropertyChangeSupport changes
vetos
protected VetoableChangeSupport vetos
modifies
protected ModifiableChangeSupport modifies
myName
protected String myName
StateMachine
public StateMachine()
- The default constructor for this bean.
StateMachine
public StateMachine(StringTokenizer specification)
- Construct a state machine.
getState
public abstract String getState()
- Returns the current state of the state machine.
getStateTransitions
public abstract String getStateTransitions()
- Gets the states that can be reached from the current state. An array of
new states is returned.
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener l)
- Add a PropertyChangeListener to the listener list.
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener l)
- Remove a PropertyChangeListener from the listener list.
addVetoableChangeListener
public void addVetoableChangeListener(VetoableChangeListener l)
- Add a VetoableListener to the listener list.
removeVetoableChangeListener
public void removeVetoableChangeListener(VetoableChangeListener l)
- Remove a VetoableChangeListener from the listener list.
addModifiableChangeListener
public void addModifiableChangeListener(ModifiableChangeListener l)
- Add a ModifiableListener to the listener list.
removeModifiableChangeListener
public void removeModifiableChangeListener(ModifiableChangeListener l)
- Remove a ModifiableChangeListener from the listener list.
setName
public void setName(String newName)
- Set the name of this state machine.
- Parameters:
- newName - The name that will replace the existing name.
getName
public String getName()
- Get the name of this state machine.
All Packages Class Hierarchy This Package Previous Next Index
|