1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-29 15:52:08 +01:00

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

View file

@ -79,10 +79,14 @@ public class MultiMap<K, V> {
} }
} }
public void remove(K o) { public void removeAll(K o) {
for (Set<V> values : map.values()) { map.remove(o);
values.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) { public void putAll(Map<? extends K, ? extends Set<V>> _map) {