new CollectionBase()

Initializes a new instance of the CollectionBase class with the default initial capacity.

Methods

add(o) → Number

Adds an item to the CollectionBase instance.

Parameter

Name Type Optional Description

o

Object

 

The Object to add to the CollectionBase instance.

Returns

Number The position into which the new element was inserted.

clear()

Removes all objects from the CollectionBase instance.

constructor_overload$1(capacity)

Initializes a new instance of the CollectionBase class with the specified capacity.

Parameter

Name Type Optional Description

capacity

Number

 

The number of elements that the new list can initially store.

contains(o) → boolean

Return whether instance contains this object

Parameter

Name Type Optional Description

o

Object

 

test object

Returns

boolean Whether instance contains this object

get(index) → Object

Get an item at specified position.

Parameter

Name Type Optional Description

index

Number

 

Specified position index.

Returns

Object The item at specified position.

getCount() → Number

Gets the number of elements contained in the CollectionBase instance.

Returns

Number The number of elements contained in the CollectionBase instance.

indexOf(o) → Number

Determines the index of a specific item in the CollectionBase instance.

Parameter

Name Type Optional Description

o

Object

 

Determines the index of a specific item in the CollectionBase instance.

Returns

Number The index of value if found in the list; otherwise, -1.

iterator() → Iterator

Returns an enumerator that iterates through the CollectionBase instance.

Returns

Iterator An iterator for the CollectionBase instance.

removeAt(index)

Removes the item at the specified index.

Parameter

Name Type Optional Description

index

Number

 

The zero-based index of the item to remove.