W3cubDocs

/Kotlin

map

inline fun <K, V, R> Map<out K, V>.map(
    transform: (Entry<K, V>) -> R
): List<R>

Returns a list containing the results of applying the given transform function to each entry in the original map.

inline fun <T, R> Array<out T>.map(
    transform: (T) -> R
): List<R>
inline fun <R> ByteArray.map(transform: (Byte) -> R): List<R>
inline fun <R> ShortArray.map(
    transform: (Short) -> R
): List<R>
inline fun <R> IntArray.map(transform: (Int) -> R): List<R>
inline fun <R> LongArray.map(transform: (Long) -> R): List<R>
inline fun <R> FloatArray.map(
    transform: (Float) -> R
): List<R>
inline fun <R> DoubleArray.map(
    transform: (Double) -> R
): List<R>
inline fun <R> BooleanArray.map(
    transform: (Boolean) -> R
): List<R>
inline fun <R> CharArray.map(transform: (Char) -> R): List<R>

Returns a list containing the results of applying the given transform function to each element in the original array.

inline fun <T, R> Iterable<T>.map(
    transform: (T) -> R
): List<R>

Returns a list containing the results of applying the given transform function to each element in the original collection.

© 2010–2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/map.html