Class StateEvent

  • All Implemented Interfaces:
    DebugEvent
    Direct Known Subclasses:
    EventDebugEvent

    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 8.0
    Version:
    $Id$
    Author:
    Edward A. Lee
    Pt.AcceptedRating:
    Red (nobody)
    Pt.ProposedRating:
    Yellow (eal)
    • Constructor Summary

      Constructors 
      Constructor Description
      StateEvent​(FSMActor source, State state)
      Construct an event with the specified source and destination state.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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.
        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.