The requested page is not available for the requested platform. You are viewing the content for Default platform.

Collection<T> Class

Serves as a base for classes maintaining a collection of items.

Declaration

export abstract class Collection<T>

Type Parameters

Name Description
T

An individual collection item.

Properties

count Property

Gets the number of items contained in the collection.

Declaration

readonly count: number

Property Value

Type Description
number

The number of items.

Methods

getByIndex(index) Method

Gets an item with the specified index.

Declaration

getByIndex(index: number): T

Parameters

Name Type Description
index number

The index of an item in the collection.

Returns

Type Description
T

An object that is the item at the specified index.