Collection

Collection

A ‘java-style’ collection interface.

Summary
CollectionA ‘java-style’ collection interface.
Functions and Properties
containsDetermines if the collection contains a given item.
clearClears all items.
getIteratorInitializes an iterator object pointing to the first item in the collection.
sizeThe total number of items.
isEmptyChecks if the collection is empty.
toArrayConverts the collection into an array.

Functions and Properties

contains

function contains(obj: *):Boolean

Determines if the collection contains a given item.

Parameters

objThe item to search for. 

Returns

True if the item exists, otherwise false. 

clear

function clear():void

Clears all items.

getIterator

function getIterator():Iterator

Initializes an iterator object pointing to the first item in the collection.

Returns

An iterator object. 

size

function get size():int

The total number of items.

Returns

The size. 

isEmpty

function isEmpty():Boolean

Checks if the collection is empty.

Returns

True if empty, otherwise false. 

toArray

function toArray():Array

Converts the collection into an array.

Returns

An array. 

A two-dimensonal array.
A three-dimensonal array.
A queue based on an array (circular queue).
An arrayed stack.
function contains(obj: *):Boolean
Determines if the collection contains a given item.
function clear():void
Clears all items.
function getIterator():Iterator
Initializes an iterator object pointing to the first item in the collection.
function get size():int
The total number of items.
function isEmpty():Boolean
Checks if the collection is empty.
function toArray():Array
Converts the collection into an array.
Close