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

x/rimbu/hashed/map-custom/implementation/immutable.ts>HashMapCollision

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
class HashMapCollision
import { HashMapCollision } from "https://deno.land/x/rimbu@1.0.4/hashed/map-custom/implementation/immutable.ts";

Constructors

new
HashMapCollision(context: HashMapContext<K>, entries: List.NonEmpty<readonly [K, V]>)

Properties

readonly
size: number

Methods

addEntry(entry: readonly [K, V], hash?: number): HashMapCollision<K, V>
copy(entries?): HashMapCollision<K, V>
forEach(f: (
entry: readonly [K, V],
index: number,
halt: () => void,
) => void
, state: TraverseState
): void
get<U, O>(
key: RelatedTo<K, U>,
otherwise?: OptLazy<O>,
keyHash?: number,
): V | O
mapValues<V2>(mapFun: (value: V, key: K) => V2): HashMap.NonEmpty<K, V2>
modifyAt(
atKey: K,
options: { ifNew?: OptLazyOr<V, Token>; ifExists?: (currentValue: V, remove: Token) => V | Token; },
atKeyHash?: number,
): HashMap<K, V> | any
stream(): Stream.NonEmpty<readonly [K, V]>
toArray(): ArrayNonEmpty<readonly [K, V]>