What\'s the quickest way to remove an element from a Map by value in Java?
Currently I\'m using:
DomainObj valueToRemove = new DomainObj(); S
map.values().removeAll(Collections.singleton(null));
reference to How to filter "Null" values from HashMap?, we can do following for java 8:
map.values().removeIf(valueToRemove::equals);