Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Event

Base class for event This class acts as a base class for the actual event implementations.

Hierarchy

Implemented by

Index

Constructors

constructor

Properties

_isDisposed

_isDisposed: boolean = false

_observers

_observers: Set<Observer>

Accessors

isDisposed

  • get isDisposed(): boolean

Methods

accept

date

  • date(): Date
  • returns the date at which the event occurs

    Returns Date

dispose

  • dispose(): void
  • Returns void

hasOccurred

  • hasOccurred(d?: Date, includeRefDate?: boolean): boolean
  • returns true if an event has already occurred before a date if is includeRefDate true, then an event has not occurred if its date is the same as the refDate, i.e. this method returns false if the event date is the same as the refDate.

    Parameters

    • Default value d: Date = null
    • Default value includeRefDate: boolean = null

    Returns boolean

notifyObservers

  • notifyObservers(): void
  • This method should be called at the end of non-const methods or when the programmer desires to notify any changes.

    Returns void

registerObserver

unregisterObserver