Interface ICollection

This is the collection interface.

interface ICollection {
    add(...args: any[]): number;
    contains(...args: any[]): boolean;
    indexOf(...args: any[]): number;
    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

  • 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