forcelain
11/26/2017, 11:05 AMCzar
11/26/2017, 11:11 AMyourMap.containsKey("someKey")
By value you have to check all the values, e.g.
yourMap.find { it.value == yourValue } != null
karelpeeters
11/26/2017, 11:20 AMkey in map
and value in map.values
.map.values
can be bad, but HashMap
caches the result (and it even updates with the map), so it should be fine.forcelain
11/26/2017, 12:06 PMkarelpeeters
11/26/2017, 12:10 PMmap[key] == value
then?forcelain
11/26/2017, 12:13 PM