Package jasima.core.simulation.util
Class SimEventMethodCall
- java.lang.Object
-
- jasima.core.simulation.SimEvent
-
- jasima.core.simulation.util.SimEventMethodCall
-
- All Implemented Interfaces:
Comparable<SimEvent>,Runnable
public final class SimEventMethodCall extends SimEvent
This class is used internally by#scheduleAt(double,int,Runnable)to run a certain method at a particular simulation time.
-
-
Field Summary
Fields Modifier and Type Field Description booleanisAppEventRunnablem-
Fields inherited from class jasima.core.simulation.SimEvent
EVENT_PRIO_HIGH, EVENT_PRIO_HIGHER, EVENT_PRIO_HIGHEST, EVENT_PRIO_LOW, EVENT_PRIO_LOWER, EVENT_PRIO_LOWEST, EVENT_PRIO_MAX, EVENT_PRIO_MIN, EVENT_PRIO_NORMAL
-
-
Constructor Summary
Constructors Constructor Description SimEventMethodCall(double time, int prio, String description, Runnable method)SimEventMethodCall(double time, int prio, String description, Runnable method, boolean isAppEvent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandle()Override this method to implement the actual functionality.booleanisAppEvent()An application event is the usual event type in a simulation.StringtoString()-
Methods inherited from class jasima.core.simulation.SimEvent
compareTo, eventType, getDescription, getPrio, getTime, run, setDescription, setPrio, setTime
-
-
-
-
Field Detail
-
m
public final Runnable m
-
isAppEvent
public final boolean isAppEvent
-
-
Method Detail
-
handle
public void handle()
Description copied from class:SimEventOverride this method to implement the actual functionality.
-
isAppEvent
public boolean isAppEvent()
Description copied from class:SimEventAn application event is the usual event type in a simulation. A simulation is terminated if the event queue is empty or does not contain any application events (i.e. isAppEvent() of all events in the queue returns false).- Overrides:
isAppEventin classSimEvent
-
-