Options
All
  • Public
  • Public/Protected
  • All
Menu

The base implementation of the Activity interface.

since

1.0

Type parameters

  • T

    the type of an optional user object

Hierarchy

Implements

Index

Constructors

constructor

  • new ActivityBase(_name?: string | null | undefined, _startTime?: number, _endTime?: number): ActivityBase
  • Constructs a new activity with the given name, start time, and end time.

    since

    1.0

    Parameters

    • Optional _name: string | null | undefined

      the name of the activity

    • Default value _startTime: number = TimeUtil.now()

      the start time of the activity

    • Default value _endTime: number = requiringTime(_startTime) + ActivityBase.DEFAULT_DURATION

      the end time of the activity

    Returns ActivityBase

Properties

Static DEFAULT_DURATION

DEFAULT_DURATION: number = TimeUtil.ofDays(5)

Methods

getEndTime

  • getEndTime(): number
  • The end time of the activity.

    since

    1.0

    Returns number

    the activity end time

getId

  • getId(): string
  • The unique id of the activity.

    since

    1.0

    Returns string

    the unique activity ID

getName

  • getName(): string
  • The name of the activity, for example "Flight 3441".

    since

    1.0

    Returns string

    the name of the activity

getStartTime

  • getStartTime(): number
  • The start time of the activity.

    since

    1.0

    Returns number

    the activity start time

getUserObject

  • getUserObject(): T
  • Returns the user object associated to the activity.

    since

    1.0

    Returns T

    the user object associated to the activity

setUserObject

  • setUserObject(obj: T): void
  • Set the user object associated to the activity.

    since

    1.0

    Parameters

    • obj: T

      the user object to associate to the activity

    Returns void

toString

  • toString(): string
  • Returns string