Interface StateChart<T>

All Known Implementing Classes:
DefaultStateChart

public interface StateChart<T>
  • Method Details

    • receiveMessage

      void receiveMessage(Object message)
      Receive a message into the statechart queue.
    • getAgent

      T getAgent()
      Gets the agent associated with this StateChart.
      Returns:
      the agent associated with this StateChart.
    • begin

      void begin(StateChartSimIntegrator integrator)
      Begin state chart.
    • stop

      void stop()
      Stops the state chart.
    • getCurrentSimpleState

      AbstractState<T> getCurrentSimpleState()
      Retrieve current state.
      Returns:
    • withinState

      boolean withinState(String id)
    • getCurrentStates

      List<AbstractState<T>> getCurrentStates()
    • getUuidForState

      String getUuidForState(AbstractState<T> state)
    • getStateForUuid

      AbstractState<T> getStateForUuid(String uuid)
      Returns the state associated with the uuid or null if not found.
      Parameters:
      uuid -
      Returns:
    • registerStateChartListener

      void registerStateChartListener(StateChartListener scl)
    • removeStateChartListener

      void removeStateChartListener(StateChartListener scl)
    • getTransitionForUuid

      Transition<T> getTransitionForUuid(String uuid)
      Returns the transition associated with the uuid or null if not found.
      Parameters:
      uuid -
      Returns:
    • activateState

      void activateState(AbstractState<T> state)
      Activates the state if it exists. Should be called when simulation is paused.
      Parameters:
      state - the state to activate
    • followTransition

      void followTransition(Transition<T> transition)
      Follow the transition if valid. Should be called when simulation is paused.
      Parameters:
      transition - the transition to follow
    • activateState

      void activateState(String stateID)
      Activates the state (identified by a potentially non-unique ID) if it exists.
      Parameters:
      stateID - the potentially non-unique ID of the state to activate
    • followTransition

      void followTransition(String transitionID)
      Follow the transition (identified by a potentially non-unique ID) if valid.
      Parameters:
      transitionID - the potentially non-unique ID of the transition to follow
    • getPriority

      double getPriority()
    • resolve

      void resolve()