Class CollectionAbstract

A Collection is an iterable Container type. This is an abstract base class for user-defined collection types.

Abstract

Implements

Hierarchy

Implements

Constructors

Accessors

Methods

Constructors

Accessors

  • get size(): number
  • Returns the total number of elements in the collection.

    Returns number

Methods

  • Adds a new item to the collection.

    Parameters

    • item: any

      The item to add to the collection.

    Returns any

  • Checks if item is present in the collection.

    Returns

    true when the element is found, else false

    Parameters

    • item: any

      The item to search for in the collection.

    Returns boolean

Generated using TypeDoc