entries
Returns a MutableSet of all key/value pairs in this map.
Since Kotlin
1.0Samples
import kotlin.test.*
import java.util.*
fun main() {
//sampleStart
val map = mutableMapOf(1 to "one", 2 to "two")
val entries = map.entries
println(entries) // [1=one, 2=two]
entries.first().setValue("*ONE*")
println(entries) // [1=*ONE*, 2=two]
entries.clear()
println("map.isEmpty() is ${map.isEmpty()}") // true
//sampleEnd
}
Returns a MutableSet of all key/value pairs in this map.
Since Kotlin
1.1Samples
import kotlin.test.*
import java.util.*
fun main() {
//sampleStart
val map = mutableMapOf(1 to "one", 2 to "two")
val entries = map.entries
println(entries) // [1=one, 2=two]
entries.first().setValue("*ONE*")
println(entries) // [1=*ONE*, 2=two]
entries.clear()
println("map.isEmpty() is ${map.isEmpty()}") // true
//sampleEnd
}
Returns a MutableSet of all key/value pairs in this map.
Since Kotlin
1.3Samples
import kotlin.test.*
import java.util.*
fun main() {
//sampleStart
val map = mutableMapOf(1 to "one", 2 to "two")
val entries = map.entries
println(entries) // [1=one, 2=two]
entries.first().setValue("*ONE*")
println(entries) // [1=*ONE*, 2=two]
entries.clear()
println("map.isEmpty() is ${map.isEmpty()}") // true
//sampleEnd
}
Returns a MutableSet of all key/value pairs in this map.
Since Kotlin
1.8Samples
import kotlin.test.*
import java.util.*
fun main() {
//sampleStart
val map = mutableMapOf(1 to "one", 2 to "two")
val entries = map.entries
println(entries) // [1=one, 2=two]
entries.first().setValue("*ONE*")
println(entries) // [1=*ONE*, 2=two]
entries.clear()
println("map.isEmpty() is ${map.isEmpty()}") // true
//sampleEnd
}
Returns a MutableSet of all key/value pairs in this map.
Since Kotlin
1.8Samples
import kotlin.test.*
import java.util.*
fun main() {
//sampleStart
val map = mutableMapOf(1 to "one", 2 to "two")
val entries = map.entries
println(entries) // [1=one, 2=two]
entries.first().setValue("*ONE*")
println(entries) // [1=*ONE*, 2=two]
entries.clear()
println("map.isEmpty() is ${map.isEmpty()}") // true
//sampleEnd
}