KEYTYPE - key typeVALUETYPE - value typeCOLLTYPE - contained collection type@NotThreadSafe public abstract class AbstractMultiLinkedHashMap<KEYTYPE,VALUETYPE,COLLTYPE extends Collection<VALUETYPE>> extends LinkedHashMap<KEYTYPE,COLLTYPE> implements IMultiMap<KEYTYPE,VALUETYPE,COLLTYPE>
LinkedHashMap.AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
AbstractMultiLinkedHashMap() |
AbstractMultiLinkedHashMap(KEYTYPE aKey,
COLLTYPE aCollection) |
AbstractMultiLinkedHashMap(KEYTYPE aKey,
VALUETYPE aValue) |
AbstractMultiLinkedHashMap(Map<? extends KEYTYPE,? extends COLLTYPE> aCont) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsSingle(KEYTYPE aKey,
VALUETYPE aValue)
Check a single element from the container identified by the passed key is
present.
|
protected abstract COLLTYPE |
createNewCollection() |
COLLTYPE |
getOrCreate(KEYTYPE aKey)
Get or create the collection of the specified key.
|
long |
getTotalValueCount() |
EChange |
putAllIn(Map<? extends KEYTYPE,? extends VALUETYPE> aMap)
Add all values into the container identified by the passed key-value-map.
|
EChange |
putSingle(KEYTYPE aKey,
VALUETYPE aValue)
Add a single value into the container identified by the passed key.
|
EChange |
removeSingle(KEYTYPE aKey,
VALUETYPE aValue)
Remove a single element from the container identified by the passed key.
|
clear, containsValue, get, removeEldestEntryclone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, valuesequals, hashCode, toStringpublic AbstractMultiLinkedHashMap()
public AbstractMultiLinkedHashMap(@Nullable KEYTYPE aKey, @Nullable VALUETYPE aValue)
public AbstractMultiLinkedHashMap(@Nullable KEYTYPE aKey, @Nullable COLLTYPE aCollection)
@Nonnull 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.EChange@Nonnull public final EChange putSingle(@Nullable KEYTYPE aKey, @Nullable VALUETYPE aValue)
IMultiMap@Nonnull public final EChange putAllIn(@Nonnull Map<? extends KEYTYPE,? extends VALUETYPE> aMap)
IMultiMap@Nonnull public final EChange removeSingle(@Nullable KEYTYPE aKey, @Nullable VALUETYPE aValue)
IMultiMapremoveSingle in interface IMultiMap<KEYTYPE,VALUETYPE,COLLTYPE extends Collection<VALUETYPE>>aKey - The key to use. May not be null.aValue - The value to be removed. May be null.EChangepublic final boolean containsSingle(@Nullable KEYTYPE aKey, @Nullable VALUETYPE aValue)
IMultiMapcontainsSingle in interface IMultiMap<KEYTYPE,VALUETYPE,COLLTYPE extends Collection<VALUETYPE>>aKey - The key to use. May not be null.aValue - The value to be checked. May be null.EChange@Nonnegative public final long getTotalValueCount()
getTotalValueCount in interface IMultiMap<KEYTYPE,VALUETYPE,COLLTYPE extends Collection<VALUETYPE>>Copyright © 2006–2015 phloc systems. All rights reserved.