kotlin.collections.toMap

toMap

fun <K, V> Iterable<Pair<K, V>>.toMap(): Map<K, V>

Returns a new map containing all key-value pairs from the given collection of pairs.

The returned map preserves the entry iteration order of the original collection.

fun <K, V, M : MutableMap<in K, in V>> Iterable<Pair<K, V>>.toMap(
    destination: M
): M

Populates and returns the 登录查看完整内容