PeekableIterator

class PeekableIterator<T : Any>(base: Iterator<T>) : Iterator<T>

Constructors

Link copied to clipboard
constructor(base: Iterator<T>)

Functions

Link copied to clipboard
open operator override fun hasNext(): Boolean
Link copied to clipboard
open operator override fun next(): T
Link copied to clipboard
fun peek(): T?

Each call to this method peeks ahead one additional time without affecting the result of subsequent next calls.