SheetXL - v0.3.20
    Preparing search index...

    Interface IBuilder<T>

    A builder for easily creating tuples that can be either contiguous or non-contiguous. A builder maintains an ordered structure where major and minor values must always increase, otherwise an error will be thrown.

    interface IBuilder<T = any> {
        addValue(major: number, minor: number, value: T): IBuilder<T>;
        addValues(major: number, minor: number, value: T[]): IBuilder<T>;
        build(): BoundedTuples<T>;
    }

    Type Parameters

    • T = any

      The type of values stored within the tuples.

    Implemented by

    Index

    Methods

    • Adds a single value associated with a specific major and minor index.

      Parameters

      • major: number

        The major index.

      • minor: number

        The minor index.

      • value: T

        The value to be added.

      Returns IBuilder<T>

      Error If the point is out of order compared to previously added points (within the same row).

      If the value is an Array, it will be treated as a discrete value. If you want to set multiple values along the minor axis, then use addValues.

    • Adds multiple values associated with a specific major and minor index.

      Parameters

      • major: number

        The major index.

      • minor: number

        The minor index.

      • value: T[]

        An array of values to be added.

      Returns IBuilder<T>

      Error If the point is out of order compared to previously added points (within the same row).

    • Constructs and returns the bounded tuples based on the added values. This method can be called multiple times.

      Returns BoundedTuples<T>

      The built bounded tuples.