KEYTYPE - key typeVALUETYPE - value typeCOLLTYPE - contained collection type@NotThreadSafe public abstract class AbstractMultiTreeMap<KEYTYPE,VALUETYPE,COLLTYPE extends Collection<VALUETYPE>> extends TreeMap<KEYTYPE,COLLTYPE> implements IMultiMap<KEYTYPE,VALUETYPE,COLLTYPE>
TreeMap.AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
AbstractMultiTreeMap() |
AbstractMultiTreeMap(Comparator<? super KEYTYPE> aComparator) |
AbstractMultiTreeMap(KEYTYPE aKey,
COLLTYPE aCollection) |
AbstractMultiTreeMap(KEYTYPE aKey,
VALUETYPE aValue) |
AbstractMultiTreeMap(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.
|
ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, put, putAll, remove, size, subMap, subMap, tailMap, tailMap, valuesequals, hashCode, isEmpty, toStringpublic AbstractMultiTreeMap()
public AbstractMultiTreeMap(@Nullable Comparator<? super KEYTYPE> aComparator)
public AbstractMultiTreeMap(@Nullable KEYTYPE aKey, @Nullable VALUETYPE aValue)
public AbstractMultiTreeMap(@Nullable KEYTYPE aKey, @Nullable COLLTYPE aCollection)
@Nonnull @ReturnsMutableCopy protected abstract COLLTYPE createNewCollection()
@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.null.@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.true if the value is contained, false
otherwise@Nonnegative public final long getTotalValueCount()
getTotalValueCount in interface IMultiMap<KEYTYPE,VALUETYPE,COLLTYPE extends Collection<VALUETYPE>>Copyright © 2014–2015 Philip Helger. All rights reserved.