Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AList defines a list of typed objects.

Type parameters

  • T

Hierarchy

  • AList

Implements

  • IList

Index

Constructors

constructor

  • new AList(genericType: string): AList
  • Create a new list.

    Parameters

    • genericType: string

      the generic type of the elements in the list, like MapObject.TYPE for example.

    Returns AList

Methods

add

  • add(element: T): void
  • Add an element.

    Parameters

    • element: T

      the element to add.

    Returns void

addAt

  • addAt(index: int32, element: T): void
  • Add an element at a certain index.

    Parameters

    • index: int32

      the index to add at.

    • element: T

      the element to add.

    Returns void

addList

  • addList(list: AList<T>): void
  • Add a list of elements.

    Parameters

    • list: AList<T>

      the list.

    Returns void

addObject

  • addObject(element: Object): void
  • Add an untyped object.

    Parameters

    • element: Object

      the element to add.

    Returns void

addObjectList

  • addObjectList(list: AList<Object>): void
  • Add a list of untyped objects.

    Parameters

    • list: AList<Object>

      the list.

    Returns void

clear

  • clear(): void
  • Clear the list.

    Returns void

get

  • get(index: int32): T
  • Get an element.

    Parameters

    • index: int32

      the index of the element.

    Returns T

    the element.

getGenericType

  • getGenericType(): string
  • Get the generic type of the elements.

    Returns string

    the generic type of the elements, like MapObject.TYPE for example.

getObject

  • getObject(index: int32): Object
  • Get an untyped object.

    Parameters

    • index: int32

      the index of the object.

    Returns Object

    the element.

removeAt

  • removeAt(index: int32): T
  • Remove an element.

    Parameters

    • index: int32

      the index to remove at.

    Returns T

    the removed element.

set

  • set(index: int32, element: T): void
  • Set an element.

    Parameters

    • index: int32

      the index of the element.

    • element: T

      the element.

    Returns void

setObject

  • setObject(index: int32, element: Object): void
  • Set an untyped element.

    Parameters

    • index: int32

      the index of the element.

    • element: Object

      the element.

    Returns void

size

  • size(): int32
  • Get the number of elements.

    Returns int32

    the number of elements.

toArray

  • toArray(): Array<T>
  • Get a native array.

    Returns Array<T>

    a native array.

toString

  • toString(): string
  • Convert the object to a string.

    Returns string

    the string form of the object.

Static fromArray

  • fromArray<T2>(list: Array<T2>, genericType: string): AList<T2>
  • Create a list from a native array.

    Type parameters

    • T2

    Parameters

    • list: Array<T2>

      -

    • genericType: string

    Returns AList<T2>

    AList