Options
All
  • Public
  • Public/Protected
  • All
Menu

An interval tree implementation to store activities based on their start and end time.

see

IntervalTreeActivityRepository

since

1.0

Type parameters

Hierarchy

  • IntervalTree

Index

Properties

Static MAX_INTEGER

MAX_INTEGER: number = 9223372036854776000

Static MIN_INTEGER

MIN_INTEGER: number = -9223372036854775808

Methods

add

  • add(activity: A): boolean
  • Adds an activity to the tree.

    since

    1.0

    Parameters

    • activity: A

      the activity to add

    Returns boolean

    true if the activity could be added

clear

  • clear(): void
  • Removes all activities from the tree.

    since

    1.0

    Returns void

getEarliestTimeUsed

  • getEarliestTimeUsed(): number | undefined
  • Returns the earliest time used by all activities currently stored inside the tree.

    since

    1.0

    Returns number | undefined

    the earliest time used

getIntersectingObjects

  • Returns all activities found within the given time interval.

    since

    1.0

    Parameters

    Returns A[]

    the found activities

getLatestTimeUsed

  • getLatestTimeUsed(): number | undefined
  • Returns the latest time used by all activities currently stored inside the tree.

    since

    1.0

    Returns number | undefined

    the latest time used

remove

  • remove(activity: A): boolean
  • Method to remove period/key object from tree. Entry to delete will be found by period and key values of given activity (not by given object reference).

    since

    1.0

    Parameters

    • activity: A

      the activity to remove

    Returns boolean

    true if the activity was a member of this tree

removePeriod

  • Removes all activities found within the given time interval.

    since

    1.0

    Parameters

    Returns A[]

    the removed activities

size

  • size(): number
  • Returns the number of activities stored inside the tree.

    since

    1.0

    Returns number

    the tree size