Class AbstractSimEventDelegator<E extends IEntity>

  • Type Parameters:
    M - the type of the simulation model
    E - the type of the entity which is modified by this event
    All Implemented Interfaces:
    ISimEvent<E>

    public abstract class AbstractSimEventDelegator<E extends IEntity>
    extends SimulationElement
    implements ISimEvent<E>
    See Also:
    ISimEvent
    • Constructor Detail

    • Method Detail

      • eventRoutine

        public abstract void eventRoutine​(E who)
        Executes the simulation logic associated with this event.

        Notice, that this method is not intended to be called by clients. Instead, the event scheduler of the respective simulation library invokes this method as soon as the simulation is reached at which the event has been scheduled.

        Parameters:
        who - the entity associated with this event
      • schedule

        public void schedule​(E entity,
                             double delay)
        Schedules this event to occur in delay simulated time units.
        Specified by:
        schedule in interface ISimEvent<E extends IEntity>
        Parameters:
        entity - the entity which is associated with this event; null, if the event is not related to a certain entity.
        delay - the period of simulated time to wait before this event is executed.
      • removeEvent

        public void removeEvent()
        Removes this event from the list of future events.
        Specified by:
        removeEvent in interface ISimEvent<E extends IEntity>