Package microsim.event
Class SystemEvent
java.lang.Object
microsim.event.Event
microsim.event.SystemEvent
- All Implemented Interfaces:
Comparable<Event>
System events are directly processed by the simulation engine. There are some special events that engine is able to
understand. For instance, you can schedule the end of simulation using a system event
SystemEventType.END
by
passing it to EventQueue
.-
Field Summary
-
Constructor Summary
ConstructorDescriptionSystemEvent
(@NonNull SimulationEngine engine, @NonNull SystemEventType type) The default constructor. -
Method Summary
Methods inherited from class microsim.event.Event
compareTo, setTimeAtNextLoop, setTimeOrderingAndLoopPeriod
-
Constructor Details
-
SystemEvent
public SystemEvent(@NonNull @NonNull SimulationEngine engine, @NonNull @NonNull SystemEventType type) The default constructor.- Parameters:
engine
- ASimulationEngine
object.type
- The type of system event.- Throws:
NullPointerException
- when any of the input object isnull
.
-
-
Method Details
-
fireEvent
Triggers the event based on its type- Specified by:
fireEvent
in classEvent
- Throws:
SimulationException
- when the engine fails to progress current simulation.
-
toString
Converts this system event to a string.
-