HasNextIterator<E> class

Wrapper for Iterator providing the pre-Dart 1.0 iterator interface.

This class should not be used in new code.

The HasNextIterator class wraps an Iterator and provides methods to iterate over an object using hasNext and next.

The HasNextIterator does not implement the Iterator interface.

This class was intended for migration to the current Iterator interface, from an earlier interface using hasNext and next. The API change happened in the Dart 1.0 release. Any other use of this class should be migrated to using the current API directly, e.g., using a separate variable to cache the Iterator.moveNext result, so that hasNext can be checked multiple times.

Annotations
  • @Deprecated("Will be removed in a later version of the Dart SDK")

Constructors

HasNextIterator(Iterator<E> iterator)

Properties

hashCode int
The hash code for this object.
read-onlyinherited
hasNext bool
Whether the iterator has a next element.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

next() → E
Provides the next element of the iterable, and moves past it.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited