igorvd
06/28/2018, 12:55 PMif (key in map) {
val value = map[key]!!
}
If I remove the assertion operator, the type of the value will be ?Pavlo Liapota
06/28/2018, 5:16 PMif (key in map) {
val value = map.getValue(key)
}
or
val value = map[key]
if (value != null) {
// ...
}igorvd
06/28/2018, 5:33 PMgetValue method. It works like a charm here. Thanks 😃gildor
06/30/2018, 1:39 PMval value = map[key] ?: error("My custom error")