KEYTYPE - key typeVALUETYPE - value typeCOLLTYPE - contained collection type@NotThreadSafe public abstract class AbstractMultiHashMap<KEYTYPE,VALUETYPE,COLLTYPE extends Collection<VALUETYPE>> extends CommonsHashMap<KEYTYPE,COLLTYPE> implements IMultiMap<KEYTYPE,VALUETYPE,COLLTYPE>
HashMap.AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
AbstractMultiHashMap() |
AbstractMultiHashMap(KEYTYPE aKey,
COLLTYPE aCollection) |
AbstractMultiHashMap(KEYTYPE aKey,
VALUETYPE aValue) |
AbstractMultiHashMap(Map<? extends KEYTYPE,? extends COLLTYPE> aCont) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract COLLTYPE |
createNewCollection() |
COLLTYPE |
getOrCreate(KEYTYPE aKey)
Get or create the collection of the specified key.
|
getCloneclear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesequals, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsSingle, forEachSingle, getTotalValueCount, putAllIn, putSingle, removeSingleaddAll, copyOfEntrySet, copyOfKeySet, copyOfValues, copyOfValues, copyOfValuesMapped, copyOfValuesMapped, findFirstEntry, findFirstKey, findFirstValue, getAsUnmodifiable, getFirstEntry, getFirstKey, getFirstValue, getSortedByKey, getSortedByValue, getSwappedKeyValues, isNotEmpty, putIf, putIfNotNull, removeAll, setAllclear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesgetClonepublic AbstractMultiHashMap()
public AbstractMultiHashMap(@Nullable KEYTYPE aKey, @Nullable COLLTYPE aCollection)
@Nonnull @ReturnsMutableCopy protected abstract COLLTYPE createNewCollection()
@Nonnull @ReturnsMutableObject(value="design") public COLLTYPE getOrCreate(@Nullable KEYTYPE aKey)
IMultiMapgetOrCreate in interface IMultiMap<KEYTYPE,VALUETYPE,COLLTYPE extends Collection<VALUETYPE>>aKey - The key to use. May not be null.null.Copyright © 2014–2016 Philip Helger. All rights reserved.