Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • V = unknown

  • I = unknown

Hierarchy

Index

Constructors

constructor

  • Type parameters

    • V = unknown

    • I = unknown

    Parameters

    Returns STree<V, I>

Properties

root

root: STreePage<V, I>

Accessors

length

  • get length(): number
  • Returns number

pageSplitSize

  • get pageSplitSize(): number
  • set pageSplitSize(pageSplitSize: number): any
  • Returns number

  • Parameters

    • pageSplitSize: number

    Returns any

Methods

clear

  • clear(): void
  • Returns void

clone

  • Returns STree<V, I>

compare

  • compare(x: I, y: I): number
  • Parameters

    • x: I
    • y: I

    Returns number

Protected copy

  • Parameters

    Returns STree<V, I>

drop

  • drop(lower: number): STree<V, I>
  • Parameters

    • lower: number

    Returns STree<V, I>

entries

  • Returns Cursor<[I, V]>

forEach

  • forEach<T>(callback: (value: V, index: number, id: I) => void | T): undefined | T
  • forEach<T, S>(callback: (value: V, index: number, id: I) => void | T, thisArg: S): undefined | T
  • Type parameters

    • T

    Parameters

    • callback: (value: V, index: number, id: I) => void | T
        • (value: V, index: number, id: I): void | T
        • Parameters

          • value: V
          • index: number
          • id: I

          Returns void | T

    Returns undefined | T

  • Type parameters

    • T

    • S

    Parameters

    • callback: (value: V, index: number, id: I) => void | T
        • (value: V, index: number, id: I): void | T
        • Parameters

          • value: V
          • index: number
          • id: I

          Returns void | T

    • thisArg: S

    Returns undefined | T

get

  • get(index: number, id?: I): undefined | V
  • Parameters

    • index: number
    • Optional id: I

    Returns undefined | V

getEntry

  • getEntry(index: number, id?: I): undefined | [I, V]
  • Parameters

    • index: number
    • Optional id: I

    Returns undefined | [I, V]

identify

  • identify(value: V): I
  • Parameters

    • value: V

    Returns I

insert

  • insert(index: number, newValue: V, id?: I): STree<V, I>
  • Parameters

    • index: number
    • newValue: V
    • Optional id: I

    Returns STree<V, I>

isEmpty

  • isEmpty(): boolean
  • Returns boolean

keys

  • Returns Cursor<I>

lookup

  • lookup(id: I, start?: number): number
  • Parameters

    • id: I
    • Optional start: number

    Returns number

move

  • move(fromIndex: number, toIndex: number, id?: I): STree<V, I>
  • Parameters

    • fromIndex: number
    • toIndex: number
    • Optional id: I

    Returns STree<V, I>

pageShouldMerge

  • pageShouldMerge(page: STreePage<V, I>): boolean
  • Parameters

    Returns boolean

pageShouldSplit

  • pageShouldSplit(page: STreePage<V, I>): boolean
  • Parameters

    Returns boolean

pop

  • pop(): undefined | V
  • Returns undefined | V

push

  • push(...newValues: V[]): number
  • Parameters

    • Rest ...newValues: V[]

    Returns number

remove

  • remove(index: number, id?: I): STree<V, I>
  • Parameters

    • index: number
    • Optional id: I

    Returns STree<V, I>

reverseEntries

  • reverseEntries(): Cursor<[I, V]>
  • Returns Cursor<[I, V]>

reverseKeys

  • Returns Cursor<I>

reverseValues

  • Returns Cursor<V>

set

  • set(index: number, newValue: V, id?: I): STree<V, I>
  • Parameters

    • index: number
    • newValue: V
    • Optional id: I

    Returns STree<V, I>

shift

  • shift(): undefined | V
  • Returns undefined | V

splice

  • splice(start: number, deleteCount?: number, ...newValues: V[]): V[]
  • Parameters

    • start: number
    • Optional deleteCount: number
    • Rest ...newValues: V[]

    Returns V[]

take

  • take(upper: number): STree<V, I>
  • Parameters

    • upper: number

    Returns STree<V, I>

unshift

  • unshift(...newValues: V[]): number
  • Parameters

    • Rest ...newValues: V[]

    Returns number

values

  • Returns Cursor<V>

Generated using TypeDoc