ptolemy.domains.fsm.kernel
Class StateEvent

java.lang.Object
  extended byptolemy.domains.fsm.kernel.StateEvent
All Implemented Interfaces:
ptolemy.kernel.util.DebugEvent

public class StateEvent
extends java.lang.Object
implements ptolemy.kernel.util.DebugEvent

An event indicating a state change. This event can be used for debugging.

Since:
Ptolemy II 2.0
Version:
$Id: StateEvent.java,v 1.8 2004/04/13 03:30:59 cxh Exp $
Author:
Edward A. Lee
Accepted Rating:
Red (nobody)
Proposed Rating:
Yellow (eal)

Constructor Summary
StateEvent(FSMActor source, State state)
          Construct an event with the specified source and destination state.
 
Method Summary
 ptolemy.kernel.util.NamedObj getSource()
          Return the source of the event, which is an instance of FSMActor.
 State getState()
          Return the state to which this event refers.
 java.lang.String toString()
          Return a string representation of this event, which is the string "New state: name of state".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StateEvent

public StateEvent(FSMActor source,
                  State state)
Construct an event with the specified source and destination state.

Method Detail

getSource

public ptolemy.kernel.util.NamedObj getSource()
Return the source of the event, which is an instance of FSMActor.

Specified by:
getSource in interface ptolemy.kernel.util.DebugEvent
Returns:
The ptolemy object that published this event.

getState

public State getState()
Return the state to which this event refers.

Returns:
The state to which this event refers.

toString

public java.lang.String toString()
Return a string representation of this event, which is the string "New state: name of state".

Specified by:
toString in interface ptolemy.kernel.util.DebugEvent
Returns:
A string describing the event.