Skip to main content

Timeline for Update Immutable Map

Current License: CC BY-SA 3.0

5 events
when toggle format what by license comment
Dec 13, 2016 at 17:15 comment added Alexandr And what if I want to update the map if the value is not empty only?
Jun 27, 2014 at 19:55 comment added toto2 @Kevin I'm not sure if the original post was wrong, but the behavior is different in this answer. In the original post, if the key did not already exist in the map, the update did nothing.
Jun 27, 2014 at 15:44 comment added Kevin Meredith Using an if/else with if (map.contains (key)) would work without O(n) but it's not a succinct. Nice code above, thanks.
Jun 27, 2014 at 15:41 vote accept Kevin Meredith
Jun 27, 2014 at 8:32 history answered kiritsuku CC BY-SA 3.0