Skip to main content
Module

x/rimbu/multiset/custom/index.ts>VariantMultiSetBase.NonEmpty

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

Properties

readonly
isEmpty: false

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

readonly
countMap: WithElem<Tp, T>["countMapNonEmpty"]

Returns the Map representation of this collection.

Methods

nonEmpty(): true

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

asNormal(): WithElem<Tp, T>["normal"]

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

stream(): Stream.NonEmpty<T>

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

streamDistinct(): Stream.NonEmpty<T>

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

toArray(): ArrayNonEmpty<T>

Returns a non-empty array containing all values in this collection.