ptolemy.domains.fsm.kernel
Class StateEvent

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

public class StateEvent
extends java.lang.Object
implements DebugEvent

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

Since:
Ptolemy II 2.0
Version:
$Id: StateEvent.java 57040 2010-01-27 20:52:32Z cxh $
Author:
Edward A. Lee
Accepted Rating:
Red (nobody)
Proposed Rating:
Yellow (eal)

Field Summary
private  FSMActor _source
           
private  State _state
           
 
Constructor Summary
StateEvent(FSMActor source, State state)
          Construct an event with the specified source and destination state.
 
Method Summary
 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
 

Field Detail

_source

private FSMActor _source

_state

private State _state
Constructor Detail

StateEvent

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

Parameters:
source - The source of this state event.
state - The state of this event refers to.
Method Detail

getSource

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

Specified by:
getSource in interface 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 DebugEvent
Overrides:
toString in class java.lang.Object
Returns:
A string describing the event.