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

x/rimbu/bimap/custom/implementation/builder.ts>BiMapBuilder

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

Constructors

new
BiMapBuilder(context: BiMapContext<K, V>, source?: BiMapNonEmptyImpl<K, V>)

Properties

optional
_keyValueMap: RMap.Builder<K, V>
_lock: number
optional
_valueKeyMap: RMap.Builder<V, K>
addEntries: (source: StreamSource<readonly [K, V]>) => boolean
addEntry: (entry: readonly [K, V]) => boolean
build: () => BiMap<K, V>
forEach: (f: (
entry: readonly [K, V],
index: number,
halt: () => void,
) => void
, state?: TraverseState
) => void
getKey: <UV, O>(value: RelatedTo<V, UV>, otherwise?: OptLazy<O>) => K | O
getValue: <UK, O>(key: RelatedTo<K, UK>, otherwise?: OptLazy<O>) => V | O
hasKey: <UK>(key: RelatedTo<K, UK>) => boolean
hasValue: <UV>(value: RelatedTo<V, UV>) => boolean
readonly
isEmpty: boolean
readonly
keyValueMap: RMap.Builder<K, V>
removeKey: <UK, O>(key: RelatedTo<K, UK>, otherwise?: OptLazy<O>) => V | O
removeKeys: <UK>(keys: StreamSource<RelatedTo<K, UK>>) => boolean
removeValue: <UV, O>(value: RelatedTo<V, UV>, otherwise?: OptLazy<O>) => K | O
removeValues: <UV>(values: StreamSource<RelatedTo<V, UV>>) => boolean
set: (key: K, value: V) => boolean
readonly
size: number
readonly
valueKeyMap: RMap.Builder<V, K>