IntIterator
IntIterator (Class)
IntIterator is used for implementing interval iterations.
It is usually not used explicitly, but through its special syntax:
min...max
While it is possible to assign an instance of IntIterator to a variable or field, it is worth noting that IntIterator does not reset after being used in a for-loop. Subsequent uses of the same instance will then have no effect.
See: https://haxe.org/manual/lf-iterators.html
Instance Members
hasNext(): Bool
Returns true if the iterator has other items, false otherwise.
Returns |
---|
Bool |
next(): Int
Moves to the next item of the iterator.
If this is called while hasNext() is false, the result is unspecified.
Returns |
---|
Int |
Iterates from min
(inclusive) to max
(exclusive).
If max <= min
, the iterator will not act as a countdown.
Name | Type |
---|---|
min |
Int |
max |
Int |
Private Members
min: Int
max: Int