Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BTree<K, V, U>

Type parameters

  • K = unknown

  • V = unknown

  • U = never

Hierarchy

Implements

Index

Constructors

constructor

Properties

root

root: BTreePage<K, V, U>

Accessors

pageSplitSize

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

  • Parameters

    • pageSplitSize: number

    Returns any

size

  • get size(): number

Methods

clear

  • clear(): void

cleared

  • cleared(): BTree<K, V, U>

clone

  • clone(): BTree<K, V, U>

compare

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

    • x: K
    • y: K

    Returns number

Protected copy

delete

  • delete(key: K): boolean

drop

  • drop(lower: number): BTree<K, V, U>

entries

firstEntry

  • firstEntry(): undefined | [K, V]

firstKey

  • firstKey(): undefined | K

firstValue

  • firstValue(): undefined | V

forEach

  • forEach<T>(callback: (key: K, value: V) => void | T): undefined | T
  • forEach<T, S>(callback: (key: K, value: V) => void | T, thisArg: S): undefined | T

forEachKey

  • forEachKey<T>(callback: (key: K) => void | T): undefined | T
  • forEachKey<T, S>(callback: (key: K) => void | T, thisArg: S): undefined | T

forEachValue

  • forEachValue<T>(callback: (value: V) => void | T): undefined | T
  • forEachValue<T, S>(callback: (value: V) => void | T, thisArg: S): undefined | T

get

  • get(key: K): undefined | V

getEntry

  • getEntry(index: number): undefined | [K, V]

has

  • has(key: K): boolean

isEmpty

  • isEmpty(): boolean

keys

lastEntry

  • lastEntry(): undefined | [K, V]

lastKey

  • lastKey(): undefined | K

lastValue

  • lastValue(): undefined | V

nextEntry

  • nextEntry(key: K): undefined | [K, V]

nextKey

  • nextKey(key: K): undefined | K

nextValue

  • nextValue(key: K): undefined | V

pageShouldMerge

  • pageShouldMerge(page: BTreePage<K, V, unknown>): boolean
  • Parameters

    Returns boolean

pageShouldSplit

  • pageShouldSplit(page: BTreePage<K, V, unknown>): boolean
  • Parameters

    Returns boolean

previousEntry

  • previousEntry(key: K): undefined | [K, V]

previousKey

  • previousKey(key: K): undefined | K

previousValue

  • previousValue(key: K): undefined | V

reduced

  • reduced(identity: U, accumulator: (result: U, element: V) => U, combiner: (result: U, result2: U) => U): U

removed

  • removed(key: K): BTree<K, V, U>

reverseEntries

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

reverseKeys

reverseValues

set

  • set(key: K, newValue: V): BTree<K, V, U>

take

  • take(upper: number): BTree<K, V, U>

updated

  • updated(key: K, newValue: V): BTree<K, V, U>

values

Generated using TypeDoc