Packagecom.ext.collections
Interfacepublic interface IIterator
Implementors StringTokenizer

Defines the contract for concrete Iterator implementations which must provide an API for traversing an aggregate object



Public Methods
 MethodDefined By
  
hasNext():Boolean
Determines if there are elements remaining in the aggregate
IIterator
  
next():*
Retrieves the next element in the aggregate
IIterator
  
position():int
Determines the position of the current element in the aggreagate
IIterator
  
remove():void
Remove must be implemented to provide a standard iterator implementation.
IIterator
  
reset():void
Resets the cursor / index of the Iterator to 0
IIterator
Method Detail
hasNext()method
public function hasNext():Boolean

Determines if there are elements remaining in the aggregate

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

Retrieves the next element in the aggregate

Returns
* — next element based on the current index
position()method 
public function position():int

Determines the position of the current element in the aggreagate

Returns
int — the current index of the aggreagate
remove()method 
public function remove():void

Remove must be implemented to provide a standard iterator implementation.

Typically this method would not provide an actual implementation as an iterator is not to perform modifications, but rather simply provide a mechanism for iterating an object and thus an iterator is to be considered read-only.

For implementations which do not provide support for remove it is recommeneded that an exception is thrown, typically of type UnsupportedOperationException

reset()method 
public function reset():void

Resets the cursor / index of the Iterator to 0