Peekable<E> class

Iterator with lookahead capability.

  • peek returns next element without consuming.
  • next advances and returns element or null at end.
Implemented types
Implementers

Constructors

Peekable(Iterable<E> iterable)

Properties

current → E
The current element.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

moveNext() bool
Advances the iterator to the next element of the iteration.
override
next() → E?
Advances one and returns it, or null at end.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
peek() → E?
Returns next element without consuming, or null at end.
toString() String
A string representation of this object.
inherited

Operators

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