Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rimbu/hashed/map-custom/index.ts>HashMapNonEmptyBase

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
class HashMapNonEmptyBase
implements [HashMap.NonEmpty]<K, V>
extends NonEmptyBase<readonly [K, V]>
Re-export
Abstract
import { HashMapNonEmptyBase } from "https://deno.land/x/rimbu@0.13.1/hashed/map-custom/index.ts";

Properties

abstract
readonly
context: HashMapContext<K>
abstract
readonly
size: number

Methods

addEntries(entries: StreamSource<readonly [K, V]>): HashMap.NonEmpty<K, V>
abstract
addEntry(entry: readonly [K, V], hash?: number): HashMap.NonEmpty<K, V>
asNormal(): this
filter(pred: (
entry: readonly [K, V],
index: number,
halt: () => void,
) => boolean
): HashMap<K, V>
abstract
forEach(f: (
entry: readonly [K, V],
index: number,
halt: () => void,
) => void
, traverseState?: TraverseState
): void
abstract
get<UK, O>(key: RelatedTo<K, UK>, otherwise?: OptLazy<O>): V | O
hasKey<U>(key: RelatedTo<K, U>): boolean
abstract
mapValues<V2>(mapFun: (value: V, key: K) => V2): HashMap.NonEmpty<K, V2>
abstract
modifyAt(atKey: K, options: { ifNew?: OptLazyOr<V, Token>; ifExists?: (currentEntry: V, remove: Token) => V | Token; }): HashMap<K, V> | any
removeKey<UK>(key: RelatedTo<K, UK>): HashMap<K, V>
removeKeyAndGet<UK>(key: RelatedTo<K, UK>): [HashMap<K, V>, V] | undefined
set(key: K, value: V): HashMap.NonEmpty<K, V>
streamKeys(): Stream.NonEmpty<K>
streamValues(): Stream.NonEmpty<V>
abstract
toArray(): ArrayNonEmpty<readonly [K, V]>
toBuilder(): HashMap.Builder<K, V>
toJSON(): ToJSON<(readonly [K, V])[]>
toString(): string
updateAt<UK>(key: RelatedTo<K, UK>, update: Update<V>): HashMap.NonEmpty<K, V>