Java iteruj mapę i usuń
map.entrySet().removeIf(e -> <boolean expression>);
Inquisitive Ibex
map.entrySet().removeIf(e -> <boolean expression>);