| Package | org.as3collections |
| Interface | public interface IIterator |
| Implementors | ArrayIterator, MapIterator |
| Method | Defined By | ||
|---|---|---|---|
hasNext():Boolean
Returns true if the iteration has more elements. | IIterator | ||
next():*
Returns the next element in the iteration. | IIterator | ||
pointer():*
Returns the internal pointer of the iteration. | IIterator | ||
remove():void
Removes from the underlying collection the last element returned by the iterator (optional operation). | IIterator | ||
reset():void
Resets the internal pointer of the iterator. | IIterator | ||
| hasNext | () | method |
public function hasNext():Boolean
Returns true if the iteration has more elements.
Boolean — true if the iteration has more elements.
|
| next | () | method |
public function next():*Returns the next element in the iteration.
Returns* — the next element in the iteration.
|
NoSuchElementError — if the iteration has no more elements.
|
| pointer | () | method |
public function pointer():*Returns the internal pointer of the iteration.
In a list or queue, the pointer should be the index (position) of the iteration, typically an int.
In a map, the pointer should be the key of the iteration.
Returns* — the internal pointer of the iteration.
|
| remove | () | method |
public function remove():voidRemoves from the underlying collection the last element returned by the iterator (optional operation).
This method can be called only once per call to next.
org.as3coreaddendum.errors:UnsupportedOperationError — if the remove operation is not supported by this iterator.
| |
org.as3coreaddendum.errors:IllegalStateError — if the next method has not yet been called, or the remove method has already been called after the last call to the next method.
|
| reset | () | method |
public function reset():voidResets the internal pointer of the iterator.