E next() { // Call to hasNext is necessary to make sure we are positioned at the first // element when we start iterating. if (!hasNext) throw new StateError("No more elements"); assert(_state == _HAS_NEXT_AND_NEXT_IN_CURRENT); E result = _iterator.current; _move(); return result; }
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-collection/HasNextIterator/next.html