| java.lang.Object net.sourceforge.groboutils.mbtf.v1.engine.TransitionImpl
TransitionImpl | public class TransitionImpl implements ITransition(Code) | | Nearly-Immutable implementation of ITransition. As an immutable, transitions
cannot be created if there are cycles in the state machine. Therefore,
there needs to be a way to post-creation correctly populate the Transition's
destination state. Thus, the destination state may be set once.
author: Matt Albrecht groboclown@users.sourceforge.net version: $Date: 2003/02/10 22:52:26 $ since: June 12, 2002 |
Method Summary | |
public IAction | getAction() Returns the action used to transition to the destination state. | public IState | getDestinationState() Returns the next state if the corresponding action is executed. | public String | getName() Retrieves the name for the transition. | public IValidate[] | getValidates() Returns all validation methods used to assert that the system can
perform this transition. | public boolean | isDestinationStateSet() Allows for a builder system to detect if the destination state has
been set or not, without causing the IllegalStateException through
the getDestinationState(). | public void | setDestinationState(IState dest) Allows for post-creation setting of the destination. | public String | toString() |
getAction | public IAction getAction()(Code) | | Returns the action used to transition to the destination state.
transition's action, which can never be null. |
getDestinationState | public IState getDestinationState()(Code) | | Returns the next state if the corresponding action is executed.
destination state, which can never be null. |
getName | public String getName()(Code) | | Retrieves the name for the transition. This should be unique for
state-machine assembly purposes, but it does not have to be.
a non-null name for this transition. |
getValidates | public IValidate[] getValidates()(Code) | | Returns all validation methods used to assert that the system can
perform this transition.
a list of associated validation instances. |
isDestinationStateSet | public boolean isDestinationStateSet()(Code) | | Allows for a builder system to detect if the destination state has
been set or not, without causing the IllegalStateException through
the getDestinationState().
|
setDestinationState | public void setDestinationState(IState dest)(Code) | | Allows for post-creation setting of the destination. The destination
may only be set to a non-null value once. If there is an
attempt to pull the destination through getDestinationState()
and it has not been set yet, then an IllegalStateException will
be thrown.
|
|
|