Iteratoris a structure that permits iteration over elements of type
Any class with matching
next()fields is considered an
Iteratorand can then be used e.g. in
for-loops. This makes it easy to implement custom iterators.
false if the iteration is complete,
Usually iteration is considered to be complete if all elements of the underlying data structure were handled through calls to
next(). However, in custom iterators any logic may be used to determine the completion state.
Returns the current item of the
Iterator and advances to the next one.
This method is not required to check
hasNext() first. A call to this method while
false yields unspecified behavior.
On the other hand, iterators should not require a call to
hasNext() before the first call to
next() if an element is available.
© 2005–2016 Haxe Foundation
Licensed under a MIT license.