MappingIterator

class MappingIterator<T, R>(source: Iterator<T>, func: (T) -> R) : AbstractIterator<R>

Deprecated

[Iterator.map] now uses the [Sequence.map] function

Maps the values of the iterator lazily using func.

Constructors

Link copied to clipboard
constructor(source: Iterator<T>, func: (T) -> R)

Functions

Link copied to clipboard
fun <A> Iterator<A>.asScalaIterator(): Iterator<A>
Link copied to clipboard
fun <T> Iterator<T>.filter(predicate: (T) -> Boolean): Iterator<T>

Filters the values of the iterator lazily using predicate.

Link copied to clipboard

Flattens iterator.

Link copied to clipboard
open fun forEachRemaining(p0: Consumer<in R>)
Link copied to clipboard
open operator override fun hasNext(): Boolean
Link copied to clipboard
fun <T, R> Iterator<T>.map(func: (T) -> R): Iterator<R>

Maps the values of the iterator lazily using func.

Link copied to clipboard
open operator override fun next(): R
Link copied to clipboard
fun <T> Iterator<T>.partition(size: Int, cutIncomplete: Boolean = false): Iterator<List<T>>

Partitions the values of the iterator lazily in groups of size.

Link copied to clipboard

Allows to transform an Iterator using the Sequence functions.