containsValue

expect open override fun containsValue(value: V): Boolean(source)

Returns true if the map maps one or more keys to the specified value.

Since Kotlin

1.3

Samples

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

fun main() { 
   //sampleStart 
   val map = mapOf(1 to "one", 2 to "two")
println("map.containsValue(\"one\") is ${map.containsValue("one")}") // true
println("map.containsValue(\"1\") is ${map.containsValue("1")}") // false 
   //sampleEnd
}