Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BTree<K, V, U>

Type parameters

  • K

  • V

  • U

Hierarchy

  • BTreeContext<K, V>
    • BTree

Implements

Index

Constructors

constructor

  • new BTree(root?: BTreePage<K, V, U>): BTree

Properties

pageSplitSize

pageSplitSize: number

root

root: BTreePage<K, V, U>

Accessors

size

  • get size(): number

Methods

clear

  • clear(): void

cleared

clone

compare

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

Protected copy

  • copy(root: BTreePage<K, V, U>): BTree<K, V, U>

delete

  • delete(key: K): boolean

drop

  • drop(lower: number): this

entries

firstEntry

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

firstKey

  • firstKey(): K | undefined

firstValue

  • firstValue(): V | undefined

forEach

  • forEach<T, S>(callback: function, thisArg?: S): T | undefined

get

  • get(key: K): V | undefined

getEntry

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

has

  • has(key: K): boolean

isEmpty

  • isEmpty(): boolean

keys

lastEntry

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

lastKey

  • lastKey(): K | undefined

lastValue

  • lastValue(): V | undefined

nextEntry

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

nextKey

  • nextKey(key: K): K | undefined

nextValue

  • nextValue(key: K): V | undefined

pageShouldMerge

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

pageShouldSplit

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

previousEntry

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

previousKey

  • previousKey(key: K): K | undefined

previousValue

  • previousValue(key: K): V | undefined

reduced

  • reduced(identity: U, accumulator: function, combiner: function): U
  • Parameters

    • identity: U
    • accumulator: function
        • (result: U, element: V): U
        • Parameters

          • result: U
          • element: V

          Returns U

    • combiner: function
        • (result: U, result2: U): U
        • Parameters

          • result: U
          • result2: U

          Returns U

    Returns U

removed

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

reverseEntries

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

reverseKeys

reverseValues

set

  • set(key: K, newValue: V): this

take

  • take(upper: number): this

updated

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

values