Packagecom.yworks.support
Classpublic class CollectionIterator
InheritanceCollectionIterator Inheritance Object
Implements Iterator

An iterator implementation that iterates over the elements of a Collection

See also

Collection


Public Methods
 MethodDefined By
  
Initializes the CollectionIterator's instance with an existing Collection
CollectionIterator
  
hasNext():Boolean
Tests whether the method next() will return a valid element.
CollectionIterator
  
next():Object
Gets the next element of the set of elements.
CollectionIterator
  
reset():void
Sets the Iterator's element cursor to the first element.
CollectionIterator
Constructor Detail
CollectionIterator()Constructor
public function CollectionIterator(collection:Collection)

Initializes the CollectionIterator's instance with an existing Collection

Parameters
collection:Collection — The collection for which the iterator will be created.
Method Detail
hasNext()method
public function hasNext():Boolean

Tests whether the method next() will return a valid element.

Returns
Booleantrue if next() will return a valid element.
next()method 
public function next():Object

Gets the next element of the set of elements.

Returns
Object — The next element in the set.
reset()method 
public function reset():void

Sets the Iterator's element cursor to the first element.