Interface IArrayCollection

Array collection interface.

interface IArrayCollection {
    add(...args: any[]): number;
    contains(...args: any[]): boolean;
    indexOf(...args: any[]): number;
    insertAt(pos: number, elem: any): any;
    remove(...args: any[]): number;
}

Hierarchy (view full)

Implemented by

Methods

  • Add an element to the collection.

    Parameters

    • Rest...args: any[]

      Factors to add

    Returns number

    Index of added elements

  • Verify that the element exists in the collection.

    Parameters

    • Rest...args: any[]

      factors to check

    Returns boolean

    True if element exists, false otherwise

  • Look up an element in the collection.

    Parameters

    • Rest...args: any[]

      Factors to look up Index of

    Returns number

    element. If element does not exist -1

  • Adds an element to the specified location.

    Parameters

    • pos: number

      Where to add an element (index)

    • elem: any

      Elements to add

    Returns any

    void

  • Remove an element from the collection.

    Parameters

    • Rest...args: any[]

      Elements to be removed

    Returns number

    Index of the element I did. If the element does not exist -1