IIterator

The ‘IIterator’ interface defines a common interface for all iterator objects.

Summary
IIteratorThe ‘IIterator’ interface defines a common interface for all iterator objects.
Functions
hasNextReturns a boolean value indicating whether or not the collection has another element beyond the current index.
nextReturns the element at the current index and then moves on to the next.
resetResets this iterator back to it’s starting index.

Functions

hasNext

function hasNext():Boolean

Returns a boolean value indicating whether or not the collection has another element beyond the current index.

Returns

A boolean value indicating whether or not the collection has another element beyond the current index. 

next

function next():Object

Returns the element at the current index and then moves on to the next.

Returns

The element at the current index. 

reset

function reset():void

Resets this iterator back to it’s starting index.

Iterates through an array by starting with ‘0’ and then incrementing the index until the array length is reached.
An do-nothing iterator for structures that don’t support iterators.
Iterates through an array by starting with the array length and then decrementing the index until ‘0’ is reached.
function hasNext():Boolean
Returns a boolean value indicating whether or not the collection has another element beyond the current index.
function next():Object
Returns the element at the current index and then moves on to the next.
function reset():void
Resets this iterator back to it’s starting index.
Close