Class SimulatorPauseEvent

java.lang.Object
java.util.EventObject
mars.simulator.SimulatorPauseEvent
All Implemented Interfaces:
Serializable

public class SimulatorPauseEvent extends EventObject
Event for when the simulator stops execution of a program due to pausing. Note that the return value of EventObject.getSource() will always be a Simulator.
See Also:
  • Constructor Details

    • SimulatorPauseEvent

      public SimulatorPauseEvent(Simulator simulator, int stepCount, SimulatorPauseEvent.Reason reason)
      Construct a new event with the given parameters.
      Parameters:
      simulator - The source of this event.
      stepCount - The number of steps the simulator took (-1 if not applicable).
      reason - The reason why execution paused.
  • Method Details

    • getStepCount

      public int getStepCount()
      The number of steps the simulator took (-1 if not applicable).
    • getReason

      public SimulatorPauseEvent.Reason getReason()
      The reason why execution paused.