toMap

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

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
(source)

Populates and returns the destination mutable map with key-value pairs from the given collection of pairs.

fun <K, V> Array<out Pair<K, V>>.toMap(): Map<K, V> (source)

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

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

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

Populates and returns the destination mutable map with key-value pairs from the given array of pairs.

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

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

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

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

Populates and returns the destination mutable map with key-value pairs from the given sequence of pairs.

fun <K, V> Map<out K, V>.toMap(): Map<K, V> (source)

Platform and version requirements: Kotlin 1.1

Returns a new read-only map containing all key-value pairs from the original map.

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

fun <K, V, M : MutableMap<in K, in V>> Map<out K, V>.toMap(
    destination: M
): M
(source)

Platform and version requirements: Kotlin 1.1

Populates and returns the destination mutable map with key-value pairs from the given map.