Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/rimbu/sorted/map-custom/index.ts>SortedMapInner

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
class SortedMapInner
extends SortedMapNode<K, V>
Re-export
import { SortedMapInner } from "https://deno.land/x/rimbu@0.14.1/sorted/map-custom/index.ts";

Constructors

new
SortedMapInner(
context: SortedMapContext<K>,
entries: readonly (readonly [K, V])[],
children: readonly SortedMapNode<K, V>[],
size: number,
)

Properties

readonly
mutateChildren: SortedMapNode<K, V>[]

Methods

addInternal(entry: readonly [K, V]): SortedMapInner<K, V>
copy(
entries?: readonly (readonly [K, V])[],
children?: readonly SortedMapNode<K, V>[],
size?: number,
): SortedMapInner<K, V>
deleteMax(): [readonly [K, V], SortedMapInner<K, V>]
deleteMin(): [readonly [K, V], SortedMapInner<K, V>]
dropInternal(amount: number): SortedMapNode<K, V>
forEach(f: (
entry: readonly [K, V],
index: number,
halt: () => void,
) => void
, state?: TraverseState
): void
get<UK, O>(key: RelatedTo<K, UK>, otherwise?: OptLazy<O>): V | O
getAtIndex<O>(index: number, otherwise?: OptLazy<O>): readonly [K, V] | O
getInsertIndexOf(key: K): number
mapValues<V2>(mapFun: (value: V, key: K) => V2): SortedMapInner<K, V2>
max(): readonly [K, V]
min(): readonly [K, V]
modifyAtInternal(key: K, options: { ifNew?: OptLazyOr<V, Token>; ifExists?: (currentEntry: V, remove: Token) => V | Token; }): SortedMapInner<K, V>
mutateGetFromLeft(left: SortedMapInner<K, V>, toMe: readonly [K, V]): [readonly [K, V], SortedMapInner<K, V>]
mutateGetFromRight(right: SortedMapInner<K, V>, toMe: readonly [K, V]): [readonly [K, V], SortedMapInner<K, V>]
mutateGiveToLeft(left: SortedMapInner<K, V>, toLeft: readonly [K, V]): [readonly [K, V], SortedMapInner<K, V>]
mutateGiveToRight(right: SortedMapInner<K, V>, toRight: readonly [K, V]): [readonly [K, V], SortedMapInner<K, V>]
mutateJoinLeft(left: SortedMapInner<K, V>, entry: readonly [K, V]): void
mutateJoinRight(right: SortedMapInner<K, V>, entry: readonly [K, V]): void
mutateSplitRight(index?: number): [readonly [K, V], SortedMapInner<K, V>]
normalizeDownsizeChild(
childIndex: number,
newChild: SortedMapNode<K, V>,
newSize: number,
): SortedMapInner<K, V>
normalizeIncreaseChild(
childIndex: number,
newChild: SortedMapNode<K, V>,
newSize: number,
): SortedMapInner<K, V>
stream(reversed?: boolean): Stream.NonEmpty<readonly [K, V]>
streamSliceIndex(range: IndexRange, reversed?: boolean): Stream<readonly [K, V]>
takeInternal(amount: number): SortedMapNode<K, V>
toArray(): ArrayNonEmpty<readonly [K, V]>