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

x/rimbu/ordered/set-custom/implementation/non-empty.ts>OrderedSetNonEmpty

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
class OrderedSetNonEmpty
implements [OrderedSetBase.NonEmpty]<T, Tp>
extends NonEmptyBase<T>
import { OrderedSetNonEmpty } from "https://deno.land/x/rimbu@0.14.0/ordered/set-custom/implementation/non-empty.ts";

Constructors

new
OrderedSetNonEmpty(
context: WithElem<Tp, T>["context"],
order: List.NonEmpty<T>,
sourceSet: TpG["sourceSetNonEmpty"],
)

Type Parameters

T
Tp extends OrderedSetTypes
optional
TpG extends WithElem<Tp, T> = WithElem<Tp, T>

Properties

readonly
size: number

Methods

add(value: T): TpG["nonEmpty"]
addAll(values: StreamSource<T>): TpG["nonEmpty"]
asNormal(): any
copy(order?, sourceSet?): TpG["nonEmpty"]
difference(other: StreamSource<T>): TpG["normal"]
filter(pred: (
value: T,
index: number,
halt: () => void,
) => boolean
): TpG["normal"]
forEach(f: (
value: T,
index: number,
halt: () => void,
) => void
, state?: TraverseState
): void
has<U>(value: RelatedTo<T, U>): boolean
intersect(other: StreamSource<T>): TpG["normal"]
remove<U>(value: RelatedTo<T, U>): TpG["normal"]
removeAll<U>(values: StreamSource<RelatedTo<T, U>>): TpG["normal"]
stream(): Stream.NonEmpty<T>
symDifference(other: StreamSource<T>): TpG["normal"]
toBuilder(): TpG["builder"]
toString(): string
union(other: StreamSource<T>): TpG["nonEmpty"]