public void clear() { checkLock(); this.map.clear(); }
public ManyValuedHashMap<K, V> put2(K key, List<V> newValues) { put(key, newValues); return this; }
public Collection<List<V>> values(Comparator<? super K> c) { List<Map.Entry<K, List<V>>> entries = new ArrayList<Map.Entry<K, List<V>>>(entrySet()); Collections.sort(entries, new EntryComparator(c)); Collection<List<V>> result = new ArrayList<List<V>>(); for (Map.Entry<K, List<V>> entry : entries) { result.add(entry.getValue()); } return result; }
public List<V> remove(Object key) { checkLock(); return this.map.remove(key); }
@Override public void putAll(Map<? extends K, ? extends List<V>> m) { checkLock(); this.map.putAll(m); }
@Override public void clear(K key) { checkLock(); List<V> curValues = this.map.get(key); if (curValues != null) { curValues.clear(); } }
public List<V> put(K key, V... newValues) { checkLock(); List<V> curValues = null; if (newValues != null && key != null) {