Packagecom.ericfeminella.utils.iterators
Classpublic class ArrayCollectionIterator
InheritanceArrayCollectionIterator Inheritance com.ericfeminella.utils.iterators.Iterator

Concrete Iterator implementation which provides methods for iterating over an ArrayCollection



Protected Properties
 PropertyDefined by
  cursor : int = 0
ArrayCollectionIterator
Public Methods
 MethodDefined by
  
ArrayCollectionIterator(collection:ArrayCollection = null)
Constructor Instantiates a new ArrayCollectionIterator
ArrayCollectionIterator
  
getCursor():int
Returns the current position of the cursor for the collection aggregate
ArrayCollectionIterator
  
hasNext():Boolean
Determines if there are elements remaining in the aggregate
ArrayCollectionIterator
  
next():*
Returns the next item in the aggregate
ArrayCollectionIterator
  
reset():void
Resets the cursor position of the ArrayCollectionIterator to 0
ArrayCollectionIterator
  
setAggregate(aggregate:*):void
Sets the aggregate object in which to traverse
ArrayCollectionIterator
Property detail
cursorproperty
protected var cursor:int = 0
Constructor detail
ArrayCollectionIterator()constructor
public function ArrayCollectionIterator(collection:ArrayCollection = null)

Constructor Instantiates a new ArrayCollectionIterator

Parameters
collection:ArrayCollection (default = null) — collection in which to iterate over
Method detail
getCursor()method
public function getCursor():int

Returns the current position of the cursor for the collection 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 item in the aggregate

Returns
*
reset()method 
public override function reset():void

Resets the cursor position of the ArrayCollectionIterator to 0

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

Sets the aggregate object in which to traverse

Parameters
aggregate:* — collection to to set as aggregate