com.cometway.states
Class AutoTransition

java.lang.Object
  extended by com.cometway.states.AutoTransition
All Implemented Interfaces:
TransitionInterface

public class AutoTransition
extends java.lang.Object
implements TransitionInterface

This is an implementation of TransitionInterface that will always return the state specified in the constructor.


Constructor Summary
AutoTransition(java.lang.String name, java.lang.String state)
          Constructor for this transition.
 
Method Summary
 java.lang.String execute()
          Always returns the state when called.
 java.lang.String getName()
          Returns the name of this transition.
 java.lang.String toString()
          Returns a String representative of this transition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AutoTransition

public AutoTransition(java.lang.String name,
                      java.lang.String state)
Constructor for this transition.

Parameters:
state - Name of the state to return when execute is called.
Method Detail

execute

public java.lang.String execute()
                         throws TransitionException
Always returns the state when called.

Specified by:
execute in interface TransitionInterface
Throws:
TransitionException - if there is a problem executing the transition.

getName

public java.lang.String getName()
Returns the name of this transition.

Specified by:
getName in interface TransitionInterface

toString

public java.lang.String toString()
Returns a String representative of this transition.

Overrides:
toString in class java.lang.Object