W3cubDocs

/Kotlin

asIterable

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
fun <T> Array<out T>.asIterable(): Iterable<T>
fun ByteArray.asIterable(): Iterable<Byte>
fun ShortArray.asIterable(): Iterable<Short>
fun IntArray.asIterable(): Iterable<Int>
fun LongArray.asIterable(): Iterable<Long>
fun FloatArray.asIterable(): Iterable<Float>
fun DoubleArray.asIterable(): Iterable<Double>
fun BooleanArray.asIterable(): Iterable<Boolean>
fun CharArray.asIterable(): Iterable<Char>

Creates an Iterable instance that wraps the original array returning its elements when being iterated.

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
fun <T> Iterable<T>.asIterable(): Iterable<T>

Returns this collection as an Iterable.

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
fun <K, V> Map<out K, V>.asIterable(): Iterable<Entry<K, V>>

Creates an Iterable instance that wraps the original map returning its entries when being iterated.

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/as-iterable.html