getOrDefault

Common
JVM
JS
Native
1.1
open fun getOrDefault(
    key: K,
    defaultValue: @UnsafeVariance V
): V

Returns the value corresponding to the given key, or defaultValue if such a key is not present in the map.

Since JDK 1.8