SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Class Builder<T>

    Implementation of IBuilder that that adds in aligned order.

    With trackAbsent the builder also decides what the positions it does not store read as, the built region's Region.absentValue:

    • a value equal to the absent value is not stored once that value is known (setAbsentValue); one pushed before is stored, which reads the same;
    • a null is a blank and is never stored;
    • a blank and a non-null absent value cannot share the unstored state, so when both occur the absent positions are written out as runs and the region's absent value is null.

    Only a RepeatingList is read as one value; any other list is stored as given.

    Type Parameters

    • T = any

    Implements

    Index
    • Type Parameters

      • T = any

      Parameters

      • OptionalcreateList: CreateList<T>
      • offsetMajor: number = 0
      • offsetMinor: number = 0
      • trackAbsent: boolean = false

      Returns Tuple.Builder<T>

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

      Returns Region<T>

      The built bounded tuples.

    • The value pushed at a position, as pushAt was given it.

      Parameters

      • major: number
      • minor: number

      Returns T | undefined

      undefined if no value is stored there.

    • Declares length positions as reading the absent value over a grid that stores nothing there. Nothing is written for them unless a blank forces the absent value out. Requires trackAbsent.

      Parameters

      • major: number
      • minor: number
      • length: number

      Returns this

    • 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>

      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 pushMultipleAt.

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

      Parameters

      • major: number

        The major index.

      • minor: number

        The minor index.

      • value: IListLike<T> | T[]

        An array of values to be added.

      Returns IBuilder<T>

    • Sets the value the positions this builder does not store read as. Set once, when it is known. Requires trackAbsent.

      Parameters

      • value: T | null

      Returns this