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

x/rimbu/multimap/custom/implementation/base.ts>MultiMapBuilder

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
class MultiMapBuilder
implements [MultiMapBase.Builder]<K, V, Tp>
import { MultiMapBuilder } from "https://deno.land/x/rimbu@0.13.1/multimap/custom/implementation/base.ts";

Constructors

new
MultiMapBuilder(context: TpG["context"], source?: MultiMap.NonEmpty<K, V>)

Type Parameters

K
V
Tp extends ContextImplTypes
optional
TpG extends WithKeyValue<Tp, K, V> = WithKeyValue<Tp, K, V>

Properties

optional
_keyMap: RMap.Builder<K, RSet.Builder<V>>
_lock: number
_size: number
add: (key: K, value: V) => boolean
addEntries: (source: StreamSource<readonly [K, V]>) => boolean
build: () => TpG["normal"]
forEach: (f: (
entry: [K, V],
index: number,
halt: () => void,
) => void
, state?: TraverseState
) => void
getValues: <UK>(key: RelatedTo<K, UK>) => any
hasEntry: <UK>(key: RelatedTo<K, UK>, value: V) => boolean
hasKey: <UK>(key: RelatedTo<K, UK>) => boolean
readonly
isEmpty: boolean
readonly
keyMap: RMap.Builder<K, RSet.Builder<V>>
removeEntries: <UK, UV>(entries: StreamSource<[RelatedTo<K, UK>, RelatedTo<V, UV>]>) => boolean
removeEntry: <UK, UV>(key: RelatedTo<K, UK>, value: RelatedTo<V, UV>) => boolean
removeKey: <UK>(key: RelatedTo<K, UK>) => boolean
removeKeys: <UK>(keys: StreamSource<RelatedTo<K, UK>>) => boolean
setValues: (key: K, source: StreamSource<V>) => boolean
readonly
size: number