Bernhard
02/04/2019, 8:57 AMPavlo Liapota
02/04/2019, 8:58 AMmap.getValue(key)
Bernhard
02/04/2019, 8:59 AMCzar
02/04/2019, 9:00 AM(1..10).asSequence().mapNotNull { map[it] }
Czar
02/04/2019, 9:01 AM(1..10).asSequence()
is an example sequence of prospective keys, as I don't know what's your sequence like, and map
is your map.Bernhard
02/04/2019, 9:02 AMBernhard
02/04/2019, 9:02 AMCzar
02/04/2019, 9:07 AMmapNotNull(map::get)
instead of filter(map::containsKey)
.Czar
02/04/2019, 9:08 AM