public void add(K key, V value){ if (!this.containsKey(key)){ this.put(key, new ArrayList<>()); } this.get(key).add(value); } }
public void add(K key, V value){ if (!this.containsKey(key)){ this.put(key, new ArrayList<>()); } this.get(key).add(value); } }