Package microsim.event
Class SingleTargetEvent
java.lang.Object
microsim.event.Event
microsim.event.SingleTargetEvent
- All Implemented Interfaces:
Comparable<Event>
The simplest implementation of
Event
class. It represents an event to be passed to one specific object only.
It is often used in discrete event simulations, when an object schedule itself for a future event.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSingleTargetEvent
(@NonNull Object object, @NonNull Enum<?> actionType) Creates a new event using early binding.SingleTargetEvent
(@NonNull Object object, @NonNull String method) Creates a new event using late binding. -
Method Summary
Methods inherited from class microsim.event.Event
compareTo, setTimeAtNextLoop, setTimeOrderingAndLoopPeriod
-
Field Details
-
eventType
-
methodInvoker
-
object
-
-
Constructor Details
-
SingleTargetEvent
public SingleTargetEvent(@NonNull @NonNull Object object, @NonNull @NonNull String method) throws SimulationException Creates a new event using late binding.- Parameters:
object
- AnObject
.method
- The method name.- Throws:
SimulationException
- when no such method exists.NullPointerException
- when any of the input parameters isnull
.
-
SingleTargetEvent
Creates a new event using early binding.- Parameters:
object
- AnObject
.actionType
- The type of action to invoke.- Throws:
NullPointerException
- when any of the input parameters isnull
.
-
-
Method Details