Package mars.simulator
Class SimulatorPauseEvent
java.lang.Object
java.util.EventObject
mars.simulator.SimulatorPauseEvent
- All Implemented Interfaces:
Serializable
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of reasons for why the simulator might pause. -
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionSimulatorPauseEvent(Simulator simulator, int stepCount, SimulatorPauseEvent.Reason reason) Construct a new event with the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionThe reason why execution paused.intThe number of steps the simulator took (-1 if not applicable).Methods inherited from class java.util.EventObject
getSource, toString
-
Constructor Details
-
SimulatorPauseEvent
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
The reason why execution paused.
-