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

x/rimbu/bimultimap/custom/interface/base.ts>BiMultiMapBase.NonEmpty

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
interface BiMultiMapBase.NonEmpty
implements BiMultiMapBase<K, V, Tp>, [Streamable.NonEmpty]<[K, V]>
import { type BiMultiMapBase } from "https://deno.land/x/rimbu@0.14.0/bimultimap/custom/interface/base.ts";
const { NonEmpty } = BiMultiMapBase;

Properties

readonly
keyValueMultiMap: WithKeyValue<Tp, K, V>["keyValueMultiMapNonEmpty"]

Returns the non-empty MultiMap representation of the key to value mapping.

readonly
valueKeyMultiMap: WithKeyValue<Tp, K, V>["valueKeyMultiMapNonEmpty"]

Returns the MultiMap representation of the value to key mapping.

readonly
isEmpty: false

Returns false since this collection is known to be non-empty.

Methods

stream(): Stream.NonEmpty<[K, V]>

Returns a non-empty Stream containing all entries of this collection as tuples of key and value.

streamKeys(): Stream.NonEmpty<K>

Returns a non-empty Stream containing all keys of this collection.

streamValues(): Stream.NonEmpty<V>

Returns a non-empty Stream containing all values of this collection.

asNormal(): WithKeyValue<Tp, K, V>["normal"]

Returns this collection typed as a 'possibly empty' collection.

nonEmpty(): true

Returns true since this collection is known to be non-empty

addEntries(entries: StreamSource<readonly [K, V]>): WithKeyValue<Tp, K, V>["nonEmpty"]

Returns the collection with the entries from the given StreamSource entries added.