gugga.collections.ArrayListIterator Class Reference

Inheritance diagram for gugga.collections.ArrayListIterator:

Inheritance graph
[legend]
Collaboration diagram for gugga.collections.ArrayListIterator:

Collaboration graph
[legend]
List of all members.

Detailed Description

ArrayListIterator implements the common IIterator interface for iterating collections.

ArrayList is an Array and usually you should iterate over it using "for". This class allows abstract use of ArrayList where its type is not well known by the consumer in a polymorphic use.

ArrayListIterator iterates over a shallow copy of the ArrayList, which makes the iteration independent of the changes made on the ArrayList after the iterator is istantiated.

See also:
ArrayList
Author:
stefan

Definition at line 18 of file ArrayListIterator.as.

Public Member Functions

function get IsValid ()
function ArrayListIterator (aArrayList:ArrayList)
function reset ()
function iterate ()
function current ()
function get Current ()
function clone ()

Private Attributes

var mArrayList: ArrayList
var mCurrent: Number
var mIsValid: Boolean


Constructor & Destructor Documentation

function gugga.collections.ArrayListIterator.ArrayListIterator ( aArrayList:ArrayList   ) 

Creates instances and sets the cursor to invalid in case the provided ArrayList is empty.

Parameters:
ArrayList shallow copy to iterate over

Definition at line 30 of file ArrayListIterator.as.


Member Function Documentation

function get gugga.collections.ArrayListIterator.IsValid (  ) 

Definition at line 23 of file ArrayListIterator.as.

function gugga.collections.ArrayListIterator.reset (  ) 

Resets the cursor to the first element and retains its invalid state in case the ArrayList resource is empty.

Definition at line 39 of file ArrayListIterator.as.

function gugga.collections.ArrayListIterator.iterate (  ) 

Moves the cursor one step forward and returns Boolean value indicating is it valid.

Definition at line 48 of file ArrayListIterator.as.

function gugga.collections.ArrayListIterator.current (  ) 

Returns current item and throws exception in case it isn't valid.

Definition at line 60 of file ArrayListIterator.as.

function get gugga.collections.ArrayListIterator.Current (  ) 

Getter for mCurrent.

Definition at line 72 of file ArrayListIterator.as.

function gugga.collections.ArrayListIterator.clone (  ) 

Returns copy of the Iterator and resets cursor.

Definition at line 80 of file ArrayListIterator.as.


Member Data Documentation

var gugga.collections.ArrayListIterator.mArrayList [private]

Definition at line 20 of file ArrayListIterator.as.

var gugga.collections.ArrayListIterator.mCurrent [private]

Definition at line 21 of file ArrayListIterator.as.

var gugga.collections.ArrayListIterator.mIsValid [private]

Definition at line 22 of file ArrayListIterator.as.


Generated on Fri May 11 17:13:27 2007 for GuggaFramework by  doxygen 1.5.2