static void removeFromMapWhere(Map map, IF2 pred) { if (map == null) ret; Iterator> i = map.entrySet().iterator(); while (i.hasNext()) { Map.Entry e = i.next(); if (pred.get(e.getKey(), e.getValue())) i.remove(); } }