Finds the result of calling map.get(key).
If there is no result, it instead returns the default value.
The Map will also be updated to assign that default value to the given key.
Type Parameters
TKey
TValue
Parameters
map: Map<TKey, TValue>
Map to use.
key: TKey
Key to find the value for.
defaultValue: TValue
Value to insert and return if no result was found.
Finds the result of calling
map.get(key)
. If there is no result, it instead returns the default value. The Map will also be updated to assign that default value to the given key.