Class CollectionIterator

Iterator for Collection class

Source : file data/CollectionIterator.js at line 31

Constructor

new CollectionIterator ( collection )

The constructor

Source : file data/CollectionIterator.js at line 52

Parameters

Name Type Description
collection Collection

The collection for witch the iterator is used

Public getters and setters

readonly get done : Boolean

Move the iterator to the next object and return true when the end of the Collection is reached

Source : file data/CollectionIterator.js at line 83

readonly get first : Boolean

Returns true when the iterator is on the first object

Source : file data/CollectionIterator.js at line 90

readonly get index : Number

Returns The position of the iterator in the Collection

Source : file data/CollectionIterator.js at line 104

readonly get last : Boolean

Returns true when the iterator is on the last object

Source : file data/CollectionIterator.js at line 97

readonly get next : TravelObject

The object after the object pointed by the iterator or null if iterator is on the last object

Source : file data/CollectionIterator.js at line 76

readonly get previous : TravelObject

The object before the object pointed by the iterator or null if iterator is on the first object

Source : file data/CollectionIterator.js at line 69

readonly get value : TravelObject

The object pointed by the iterator

Source : file data/CollectionIterator.js at line 62

Private properties

#collection : Collection

The collection used by the iterator

Source : file data/CollectionIterator.js at line 38

#index : Number

The current index

Source : file data/CollectionIterator.js at line 45