MutableIterator
interface MutableIterator<out T> : Iterator<T>
An iterator over a mutable collection. Provides the ability to remove elements while iterating.
See Also
Functions
remove
Removes from the underlying collection the last element returned by this iterator.
abstract fun remove()
Extension Functions
withIndex
Returns an Iterator that wraps each element produced by the original iterator into an IndexedValue containing the index of that element and the element itself.
fun <T> Iterator<T>.withIndex(): Iterator<IndexedValue<T>>
Inheritors
MutableListIterator
An iterator over a mutable collection that supports indexed access. Provides the ability to add, modify and remove elements while iterating.
interface MutableListIterator<T> :
ListIterator<T>,
MutableIterator<T>