Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ArrayList<T>

Type parameters

  • T

Hierarchy

  • ArrayList

Implements

Index

Constructors

constructor

Methods

__@iterator

  • __@iterator(): Iterator<T>

add

  • add(t: T): boolean
  • Parameters

    • t: T

    Returns boolean

    true if this collection changed as a result of the call

addAll

addFirst

  • addFirst(t: T): boolean
  • Parameters

    • t: T

    Returns boolean

    true if this collection changed as a result of the call

addIndex

  • addIndex(index: number, t: T): void

addLast

  • addLast(t: T): boolean
  • Parameters

    • t: T

    Returns boolean

    true if this collection changed as a result of the call

clear

  • clear(): void

contains

  • contains(t: T): boolean

element

  • element(): T

forEach

get

  • get(index: number): T
  • Parameters

    • index: number

    Returns T

    the element at the specified position in this list

getCollectable

getFirst

  • getFirst(): T

getLast

  • getLast(): T

immutableCollection

immutableList

indexOf

  • indexOf(t: T): number
  • Parameters

    • t: T

    Returns number

    the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element

isEmpty

  • isEmpty(): boolean

iterator

lastIndexOf

  • lastIndexOf(t: T): number
  • Parameters

    • t: T

    Returns number

    the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element

offer

  • offer(t: T): boolean
  • Parameters

    • t: T

    Returns boolean

    true if this collection changed as a result of the call

offerFirst

  • offerFirst(t: T): boolean

offerLast

  • offerLast(t: T): boolean
  • Parameters

    • t: T

    Returns boolean

    true if this collection changed as a result of the call

peek

  • peek(): T

peekFirst

  • peekFirst(): T

peekLast

  • peekLast(): T

poll

  • poll(): T

pollFirst

  • pollFirst(): T

pollLast

  • pollLast(): T

remove

  • remove(t: T): boolean
  • Parameters

    • t: T

    Returns boolean

    true if this list contained the specified element

removeAll

removeFirst

  • removeFirst(): T

removeIndex

  • removeIndex(index: number): T
  • Parameters

    • index: number

    Returns T

    the element that was removed from the list, undefined if the element does not exist

removeLast

  • removeLast(): T

removeQueue

  • removeQueue(): T

set

  • set(index: number, element: T): T
  • Parameters

    • index: number
    • element: T

    Returns T

    the element previously at the specified position

size

  • size(): number

toJSON

  • toJSON(tmp: any): Array<T>

Generated using TypeDoc