The base class of the container implements some common methods for the container

Type Parameters

  • T

Hierarchy

Constructors

Properties

opts_: undefined | Options<T>

Accessors

  • get isFull(): boolean
  • Returns true if the container has reached the container limit

    Returns boolean

  • get isNotFull(): boolean
  • Returns true if the container has not reached the container limit

    Returns boolean

  • get reverse(): Iterable<T>
  • Sealed

    Returns an object that implements a js Iterable, but it traverses the data in reverse

    Returns Iterable<T>

Methods

  • implements js Iterable

    Sealedl

    Returns Iterator<T, any, undefined>

  • Traverse the container looking for elements until the callback returns true, then stop looking

    Returns

    whether the element was found

    Parameters

    • callback: ValidCallback<T>

      Determine whether it is the element to be found

    • Optional reverse: boolean

      If true, traverse the container in reverse order

    Returns boolean

  • call callback on each element in the container in turn

    Parameters

    • callback: ValueCallback<T>
    • Optional reverse: boolean

      If true, traverse the container in reverse order

    Returns void

  • Returns whether the data data exists in the container

    Parameters

    Returns boolean

  • Returns a js iterator

    Parameters

    • Optional reverse: boolean

      If true, returns an iterator to traverse in reverse

    Returns Iterator<T, any, undefined>

  • Adds all the elements of an container into a string, separated by the specified separator string.

    Type Parameters

    • TO

    Parameters

    • Optional separator: string

      A string used to separate one element of the container from the next in the resulting string. If omitted, the array elements are separated with a comma.

    • Optional callback: MapCallback<T, TO>
    • Optional reverse: boolean

      If true, traverse the container in reverse order

    Returns string

  • Convert container to array

    Type Parameters

    • TO

    Parameters

    • callback: MapCallback<T, TO>
    • Optional reverse: boolean

      If true, traverse the container in reverse order

    Returns TO[]

Generated using TypeDoc