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

x/rimbu/bimultimap/custom/index.ts>BiMultiMapNonEmpty

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

Constructors

new
BiMultiMapNonEmpty(
context: WithKeyValue<Tp, K, V>["context"],
keyValueMultiMap: TpG["keyValueMultiMapNonEmpty"],
valueKeyMultiMap: TpG["valueKeyMultiMapNonEmpty"],
)

Type Parameters

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

Properties

readonly
keySize: number
readonly
size: number

Methods

add(key: K, value: V): WithKeyValue<Tp, K, V>["nonEmpty"]
addEntries(entries: StreamSource<readonly [K, V]>): WithKeyValue<Tp, K, V>["nonEmpty"]
asNormal(): any
filter(pred: (
entry: [K, V],
index: number,
halt: () => void,
) => boolean
, options?: { negate?: boolean; }
): WithKeyValue<Tp, K, V>["normal"]
forEach(f: (
entry: [K, V],
index: number,
halt: () => void,
) => void
, options?: { state?: TraverseState; }
): void
getKeys<UV = V>(value: RelatedTo<V, UV>): WithKeyValue<Tp, K, V>["valueMultiMapValues"]
getValues<UK = K>(key: RelatedTo<K, UK>): WithKeyValue<Tp, K, V>["keyMultiMapValues"]
hasEntry<UK = K, UV = V>(key: RelatedTo<K, UK>, value: RelatedTo<V, UV>): boolean
hasKey<UK = K>(key: RelatedTo<K, UK>): boolean
hasValue<UV = V>(key: RelatedTo<V, UV>): boolean
removeEntries<UK = K>(entries: StreamSource<[RelatedTo<K, UK>, V]>): WithKeyValue<Tp, K, V>["normal"]
removeEntry<UK = K>(key: RelatedTo<K, UK>, value: V): WithKeyValue<Tp, K, V>["normal"]
removeKey<UK = K>(key: RelatedTo<K, UK>): WithKeyValue<Tp, K, V>["normal"]
removeKeys<UK = K>(keys: StreamSource<RelatedTo<K, UK>>): WithKeyValue<Tp, K, V>["normal"]
removeValue<UV = V>(value: RelatedTo<V, UV>): WithKeyValue<Tp, K, V>["normal"]
removeValues<UV = V>(values: StreamSource<RelatedTo<V, UV>>): WithKeyValue<Tp, K, V>["normal"]
setKeys(value: V, keys: StreamSource<K>): WithKeyValue<Tp, K, V>["nonEmpty"]
setValues(key: K, values: StreamSource<V>): WithKeyValue<Tp, K, V>["nonEmpty"]
stream(): Stream.NonEmpty<[K, V]>
streamKeys(): Stream.NonEmpty<K>
streamValues(): Stream.NonEmpty<V>
toArray(): [K, V][]
toBuilder(): WithKeyValue<Tp, K, V>["builder"]
toJSON(): ToJSON<[K, V[]][], this["context"]["typeTag"]>
toString(): string