IntegerIndexedObject Class

    Package: @esfx/indexed-object

    Represents an object that can be indexed by an integer value similar to a native Array or TypedArray.

    Declaration
    export declare abstract class IntegerIndexedObject<T> 

    Constructors

    constructor()

    Constructs a new instance of the IntegerIndexedObject class

    Declaration
    constructor();

    Methods

    deleteIndex(index)

    Deletes the value at the specified index.

    Declaration
    protected deleteIndex(index: number): boolean;
    Parameters
    index
    number

    An integer index greater than or equal to zero (0).

    Returns
    boolean

    true if the value was successfully deleted; otherwise, false.

    getIndex(index)

    Gets the value at the specified index.

    Declaration
    protected abstract getIndex(index: number): T;
    Parameters
    index
    number

    An integer index greater than or equal to zero (0).

    Returns
    T

    getLength()

    Gets the "length" of the indexed object, which should be one more than the largest index stored in the object.

    Declaration
    protected abstract getLength(): number;
    Returns
    number

    hasIndex(index)

    Determines whether the object contains a value at the specified index.

    Declaration
    protected hasIndex(index: number): boolean;
    Parameters
    index
    number

    An integer index greater than or equal to zero (0).

    Returns
    boolean

    setIndex(index, value)

    Sets the value at the specified index.

    Declaration
    protected setIndex(index: number, value: T): boolean;
    Parameters
    index
    number

    An integer index greater than or equal to zero (0).

    value
    T

    The value to set for the specified index.

    Returns
    boolean

    true if the value could be set; otherwise, false.

    Generated by DocFX