Fix MultiMap.remove()

This commit is contained in:
Paul Schaub 2018-08-21 14:47:39 +02:00
parent c4aaa7ae6b
commit 5cd87bd537
Signed by: vanitasvitae
GPG Key ID: 62BEE9264BF17311
1 changed files with 8 additions and 4 deletions

View File

@ -79,10 +79,14 @@ public class MultiMap<K, V> {
}
}
public void remove(K o) {
for (Set<V> values : map.values()) {
values.remove(o);
}
public void removeAll(K o) {
map.remove(o);
}
public void remove(K o, V v) {
Set<V> vs = map.get(o);
if (vs == null) return;
vs.remove(v);
}
public void putAll(Map<? extends K, ? extends Set<V>> _map) {