Class TaggedEvent<T>

An event is caused by a timer or a scheduled action. Each event is tagged with a time instant and may carry a value of arbitrary type. The tag will determine the event's position with respect to other events in the event queue.

Type Parameters

  • T

Implements

Constructors

  • Construct a new tagged event.

    Type Parameters

    • T

    Parameters

    • trigger: ScheduledTrigger<T>

      The trigger of this event.

    • tag: Tag

      The tag at which this event occurs.

    • value: T

      The value associated with this event.

    Returns TaggedEvent<T>

Properties

next: undefined | PrioritySetElement<Tag>

Pointer to the next element of the priority set that this event might be hooked into.

tag: Tag

The tag at which this event occurs.

The trigger of this event.

value: T

The value associated with this event.

Methods

  • Determine whether the given event is a duplicate of this one. If so, assign the value this event to the given one. Otherwise, return false.

    Parameters

    • node: undefined | PrioritySetElement<Tag>

      The event adopt the value from if it is a duplicate of this one.

    Returns boolean