Returns an empty read-only map of specified type.
The returned map is serializable (JVM).
Since Kotlin
1.0Samples
import kotlin.test.*
import java.util.*
fun main() {
val map = emptyMap<String, Int>()
println("map.isEmpty() is ${map.isEmpty()}")
val anotherMap = mapOf<String, Int>()
println("map == anotherMap is ${map == anotherMap}")
}
Target: JVMRunning on v.2.1.21