Packagecom.ericfeminella.utils.iterators
Classpublic class ArrayIterator
InheritanceArrayIterator Inheritance com.ericfeminella.utils.iterators.Iterator

Concrete Iterator implementation which provides methods for iterating over an array



Public Methods
 MethodDefined by
  
ArrayIterator(array:Array = null)
Instantiates a new ArrayIterator
ArrayIterator
  
getIndex():int
Returns the current index in the Array aggregate
ArrayIterator
  
hasNext():Boolean
Determines if there are elements remaining in the aggregate
ArrayIterator
  
next():*
Returns the next object element in the array
ArrayIterator
  
reset():void
Resets the index of the ArrayIterator to 0
ArrayIterator
  
setAggregate(aggregate:*):void
Sets the aggregate array in which the ArrayIterator instance is to iterator over
ArrayIterator
Constructor detail
ArrayIterator()constructor
public function ArrayIterator(array:Array = null)

Instantiates a new ArrayIterator

Parameters
array:Array (default = null) — aggregate Array for the ArrayIterator
Method detail
getIndex()method
public function getIndex():int

Returns the current index in the Array aggregate

Returns
int
hasNext()method 
public override function hasNext():Boolean

Determines if there are elements remaining in the aggregate

Returns
Boolean — true if an element remains in the aggregate, false if not
next()method 
public override function next():*

Returns the next object element in the array

Returns
* — Next array element based on the current index
reset()method 
public override function reset():void

Resets the index of the ArrayIterator to 0

setAggregate()method 
public override function setAggregate(aggregate:*):void

Sets the aggregate array in which the ArrayIterator instance is to iterator over

Parameters
aggregate:*