Options
All
  • Public
  • Public/Protected
  • All
Menu

The base implementation of a mutable chart activity.

since

1.2

Type parameters

  • T

    the type of the optional user object

Hierarchy

Implements

Index

Constructors

constructor

  • Constructs a new mutable chart activity with the given value.

    since

    1.2

    Parameters

    • value: number

      the chart value of the activity

    • Default value startTime: number = undefined

      the start time of the activity

    • Default value endTime: number = undefined

      the end time of the activity

    Returns MutableChartActivityBase

Properties

Static DEFAULT_DURATION

DEFAULT_DURATION: number = TimeUtil.ofDays(5)

Methods

addDuration

  • addDuration(duration: number, multiplier?: number): void
  • Convenience method to determine a new end time based on a duration that will be added several times to the current end time of the activity.

    since

    1.2

    Parameters

    • duration: number

      the duration of the activity

    • Default value multiplier: number = 1

      the number of times that the duration will be added

    Returns void

getChartValue

  • getChartValue(): number

getDuration

  • getDuration(): number
  • Convenience method to determine the duration between the start and the end time of the activity.

    Returns number

    the duration of the activity

getEndTime

  • getEndTime(): number

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

getUserObject

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

    since

    1.0

    Returns T

    the user object associated to the activity

setChartValue

  • setChartValue(value: number): void
  • Sets a new chart value.

    since

    1.2

    Parameters

    • value: number

    Returns void

setDuration

  • setDuration(duration: number): void
  • Convenience method to determine a new end time based on a duration that will be added to the current start time of the activity.

    since

    1.2

    Parameters

    • duration: number

      the duration of the activity

    Returns void

setEndTime

  • setEndTime(time: number): void
  • Sets a new end time on the activity.

    since

    1.2

    Parameters

    • time: number

      the new end time

    Returns void

setName

  • setName(name: string): void
  • Sets the name of the activity.

    since

    1.2

    Parameters

    • name: string

      the new name of the activity

    Returns void

setStartTime

  • setStartTime(time: number): void
  • Sets a new start time on the activity.

    since

    1.2

    Parameters

    • time: number

      the new start time

    Returns void

setUserObject

  • setUserObject(userObject: T): void
  • Parameters

    • userObject: T

    Returns void

toString

  • toString(): string
  • Returns string