kotlin.collections.mutableMapOf

mutableMapOf

inline fun <K, V> mutableMapOf(): MutableMap<K, V>

Platform and version requirements: Kotlin 1.1

Returns an empty new MutableMap.

The returned map preserves the entry iteration order.

import kotlin.test.*
import java.util.*
import kotlin.comparisons.*

fun main(args: Array<String>) {
//sampleStart
val map = mutableMapOf<Int, Any?>()
println("map.isEmpty() is ${map.isEmpty()}") // true

map[1] = "x"
map[2] = 1.05
// Now map contain