static void removeValue(Map map, B value) { if (map == null) ret; Iterator> i = map.entrySet().iterator(); while (i.hasNext()) { Map.Entry e = i.next(); if (eq(e.getValue(), value)) i.remove(); } }