Kotlin HashMap contains()
Syntax & Examples


Syntax of HashMap.contains()

The syntax of HashMap.contains() extension function is:

operator fun <K, V> Map<out K, V>.contains(key: K): Boolean

This contains() extension function of HashMap checks if the map contains the given key.