iterator

inline operator fun <T> Iterator<T>.iterator(): Iterator<T>(source)

Returns the given iterator itself. This allows to use an instance of iterator in a for loop.

Since Kotlin

1.0

Samples


inline operator fun <K, V> Map<out K, V>.iterator(): Iterator<Map.Entry<K, V>>(source)

Returns an Iterator over the entries in the Map.

Since Kotlin

1.0

Samples


@JvmName(name = "mutableIterator")
inline operator fun <K, V> MutableMap<K, V>.iterator(): MutableIterator<MutableMap.MutableEntry<K, V>>(source)

Returns a MutableIterator over the mutable entries in the MutableMap.

Since Kotlin

1.0
operator fun <T> Enumeration<T>.iterator(): Iterator<T>(source)

Creates an Iterator for an java.util.Enumeration, allowing to use it in for loops.

Since Kotlin

1.0

Samples