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

x/rimbu/table/custom/index.ts>TableNonEmpty

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
class TableNonEmpty
implements [TableBase.NonEmpty]<R, C, V, Tp>
extends NonEmptyBase<[R, C, V]>
import { TableNonEmpty } from "https://deno.land/x/rimbu@0.14.1/table/custom/index.ts";

Constructors

new
TableNonEmpty(
context: TpR["context"],
rowMap: TpR["rowMapNonEmpty"],
size: number,
)

Type Parameters

R
C
V
Tp extends ContextImplTypes
optional
TpR extends WithRow<Tp, R, C, V> = WithRow<Tp, R, C, V>

Properties

readonly
amountRows: number

Methods

addEntries(entries: StreamSource<readonly [R, C, V]>): TpR["nonEmpty"]
addEntry(entry: readonly [R, C, V]): TpR["nonEmpty"]
asNormal(): any
copy(rowMap: TpR["rowMapNonEmpty"], size: number): TpR["nonEmpty"]
copyE(rowMap: TpR["rowMap"], size: number): TpR["normal"]
filter(pred: (
entry: [R, C, V],
index: number,
halt: () => void,
) => boolean
): TpR["normal"]
filterRows(pred: (
entry: readonly [R, TpR["rowNonEmpty"]],
index: number,
halt: () => void,
) => boolean
): TpR["normal"]
forEach(f: (
entry: [R, C, V],
index: number,
halt: () => void,
) => void
, state?: TraverseState
): void
get<UR, UC, O>(
row: RelatedTo<R, UR>,
column: RelatedTo<C, UC>,
otherwise?: OptLazy<O>,
): V | O
getRow<UR>(row: RelatedTo<R, UR>): TpR["row"]
hasRowKey<UR>(row: RelatedTo<R, UR>): boolean
hasValueAt<UR, UC>(row: RelatedTo<R, UR>, column: RelatedTo<C, UC>): boolean
mapValues<V2>(mapFun: (
value: V,
row: R,
column: C,
) => V2
): (Tp & Row<R, C, V2>)["nonEmpty"]
modifyAt(
row: R,
column: C,
options: { ifNew?: OptLazyOr<V, Token>; ifExists?: (value: V, remove: Token) => V | Token; },
): TpR["normal"]
remove<UR, UC>(row: RelatedTo<R, UR>, column: RelatedTo<C, UC>): TpR["normal"]
removeAndGet<UR, UC>(row: RelatedTo<R, UR>, column: RelatedTo<C, UC>): [TpR["normal"], V] | undefined
removeEntries<UR, UC>(entries: StreamSource<[RelatedTo<R, UR>, RelatedTo<C, UC>]>): TpR["normal"]
removeRow<UR>(row: RelatedTo<R, UR>): TpR["normal"]
removeRowAndGet<UR>(row: RelatedTo<R, UR>): [TpR["normal"], TpR["rowNonEmpty"]] | undefined
removeRows<UR>(rows: StreamSource<RelatedTo<R, UR>>): TpR["normal"]
set(
row: R,
column: C,
value: V,
): TpR["nonEmpty"]
stream(): Stream.NonEmpty<[R, C, V]>
streamRows(): Stream.NonEmpty<R>
streamValues(): Stream.NonEmpty<V>
toBuilder(): TpR["builder"]
toJSON(): ToJSON<[R, [C, V][]][]>
toString(): string
updateAt<UR, UC>(
row: RelatedTo<R, UR>,
column: RelatedTo<C, UC>,
update: Update<V>,
): TpR["nonEmpty"]