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>SortedMapLeaf

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

Constructors

new
SortedMapLeaf(context: SortedMapContext<K>, entries: readonly (readonly [K, V])[])

Properties

readonly
size: number

Methods

addInternal(entry: readonly [K, V]): SortedMapNode<K, V>
copy(entries: readonly (readonly [K, V])[]): SortedMapLeaf<K, V>
deleteMax(): [readonly [K, V], SortedMapLeaf<K, V>]
deleteMin(): [readonly [K, V], SortedMapLeaf<K, V>]
dropInternal(amount: number): SortedMapLeaf<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): SortedMapLeaf<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; }): SortedMapNode<K, V>
mutateGetFromLeft(left: SortedMapLeaf<K, V>, toMe: readonly [K, V]): [readonly [K, V], SortedMapLeaf<K, V>]
mutateGetFromRight(right: SortedMapLeaf<K, V>, toMe: readonly [K, V]): [readonly [K, V], SortedMapLeaf<K, V>]
mutateGiveToLeft(left: SortedMapLeaf<K, V>, toLeft: readonly [K, V]): [readonly [K, V], SortedMapLeaf<K, V>]
mutateGiveToRight(right: SortedMapLeaf<K, V>, toRight: readonly [K, V]): [readonly [K, V], SortedMapLeaf<K, V>]
mutateJoinLeft(left: SortedMapLeaf<K, V>, entry: readonly [K, V]): void
mutateJoinRight(right: SortedMapLeaf<K, V>, entry: readonly [K, V]): void
mutateSplitRight(index?: number): [readonly [K, V], SortedMapLeaf<K, V>]
stream(reversed?: boolean): Stream.NonEmpty<readonly [K, V]>
streamSliceIndex(range: IndexRange, reversed?: boolean): Stream<readonly [K, V]>
takeInternal(amount: number): SortedMapLeaf<K, V>