GODPAPER | All Packages | All Classes | Index | Frames No Frames |
Iterator

Package | de.polygonal.ds
Interface | public interface Iterator
Implementors | DListIterator, NullIterator, SListIterator, TreeIterator

A 'java-style' iterator interface.

Public Properties

| Property | Defined By
--- | --- | ---
|  | data : * Grants access to the current item being referenced by the iterator. | Iterator

Public Methods

| Method | Defined By
--- | --- | ---
|  | hasNext():Boolean Checks if a next item exists. | Iterator
|  | next():* Returns the current item and moves the iterator to the next item in the collection. | Iterator
|  | start():void Moves the iterator to the first item in the collection. | Iterator

Property Detail

data | property

`data:*`

Grants access to the current item being referenced by the iterator. This provides a quick way to read or write the current data.

Implementation
`public function get data():*`
`public function set data(value:any):void`
Method Detail

hasNext | () | method

`public function hasNext():Boolean`

Checks if a next item exists.

Returns

| `Boolean` — True if a next item exists, otherwise false.

next | () | method |

`public function next():*`

Returns the current item and moves the iterator to the next item in the collection. Note that the next() method returns the first item in the collection when it's first called.

Returns

| `*` — The next item in the collection.

start | () | method |

`public function start():void`

Moves the iterator to the first item in the collection.

Thu Jan 16 2014, 01:11 PM +08:00