kotlin.collections.mapKeysTo

mapKeysTo

inline fun <K, V, R, M : MutableMap<in R, in V>> Map<out K, V>.mapKeysTo(
    destination: M, 
    transform: (Entry<K, V>) -> R
): M

Populates the given destination map with entries having the keys obtained by applying the transform function to each entry in this Map and the values of this map.

In case if any two entries are mapped to the equal keys, the value of the latter one will overwrite the value associated with the former one.

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

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部