Package com. github. pgreze. kollections
Types
Link copied to clipboard
Link copied to clipboard
interface MutableMapWithDefault<K, V> : MapWithDefault<K, V> , MutableMap<K, V>
Content copied to clipboard
Mutable alternative of MapWithDefault.
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <K, V> Map<K, V>.setDefault(defaultValue: (key: K) -> V): MapWithDefault<K, V>
Content copied to clipboard
Create a new MapWithDefault from given map and for each unknown key, returns the value provided by defaultValue provider.
fun <K, V> MutableMap<K, V>.setDefault(defaultValue: (key: K) -> V): MutableMapWithDefault<K, V>
Content copied to clipboard
Create a new MutableMapWithDefault from given map and for each unknown key, returns the value provided by defaultValue provider.