Reputation: 9986
private Set<Entry<Personne, List<Precision>>> mapCorrelationEtat;
for (Map.Entry<Personne, List<Precision>> entry : this.mapCorrelationEtat) {
Personne key = entry.getKey();
System.out.println(key.getIdPersonne());
}
in this linkedhashmap
I have some values, I want to remove some values from an another List
keyList: [1,2,5];
How can I do this?
Upvotes: 1
Views: 122
Reputation: 53829
You can simply call removeAll
on keySet
:
map.keySet().removeAll(keyList);
Upvotes: 2