Java Itare Map и удалите

map.entrySet().removeIf(e -> <boolean expression>);
Inquisitive Ibex