W3cubDocs

/Kotlin

toList

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

Returns a List containing all elements.

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
fun <K, V> Map<out K, V>.toList(): List<Pair<K, V>>

Returns a List containing all key-value pairs.

© 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/to-list.html