SequenceIterator<E> class
Iterates over a Sequence in growing index order.
class SequenceIterator<E> implements Iterator<E> { Sequence<E> _sequence; int _position; SequenceIterator(this._sequence) : _position = 0; bool hasNext() => _position < _sequence.length; E next() { if (hasNext()) return _sequence[_position++]; throw new NoMoreElementsException(); } }
Implements
Constructors
Methods
E next() #
Gets the next element in the iteration. Throws a NoMoreElementsException if no element is left.
E next() { if (hasNext()) return _sequence[_position++]; throw new NoMoreElementsException(); }