static void changeKeyAndModifyValue(Map map, A oldKey, A newKey, IF1 f) { if (map == null || eq(oldKey, newKey) || !map.containsKey(oldKey)) ret; B value = map.get(oldKey); map.put(newKey, f.get(value)); map.remove(oldKey); }