Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IContainer<T>

Interface for a iterative container

Type parameters

  • T

    Contained data type.

Hierarchy

Implemented by

Index

Methods

add$

  • add$(element: T): Observable<number>
  • Add an element at the end of the list

    deprecated
    see

    add$1

    Parameters

    • element: T

      The element to append to the list.

    Returns Observable<number>

    A cold observable containing the index of the added element in list.

add$1

  • add$1(element: T): Observable<number>
  • Add an element at the end of the list

    Parameters

    • element: T

      The element to append to the list.

    Returns Observable<number>

    A cold observable containing the index of the added element in list.

get$

  • get$(id: number): Observable<T>
  • Retrieve the element value from the list according to its possition in the list.

    Parameters

    • id: number

    Returns Observable<T>

    A hot observable to the element.

pop$1

  • pop$1(): Observable<T>
  • Remove the last element of the container.

    Returns Observable<T>

    A cold observable containing the value of the removed element in the container (observable will return undefined if the container is empty).

remove

  • remove(position: number): void
  • Remove an element using its position in the list

    Parameters

    • position: number

      The position index of the element to remove.

    Returns void

shift$1

  • shift$1(): Observable<T>
  • Remove an element at the start of the container.

    Returns Observable<T>

    a cold observable on the removed element (observable returns undefined if the container is empty).

unshift$1

  • unshift$1(element: T): Observable<number>
  • Add an element at the start of the container.

    Parameters

    • element: T

      The element to prepend to the container.

    Returns Observable<number>

    nothing.

Generated using TypeDoc