Class CommonsTreeMap<KEYTYPE,VALUETYPE>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.TreeMap<KEYTYPE,VALUETYPE>
-
- com.helger.commons.collection.impl.CommonsTreeMap<KEYTYPE,VALUETYPE>
-
- Type Parameters:
KEYTYPE- Map key typeVALUETYPE- Map value type
- All Implemented Interfaces:
ICommonsMap<KEYTYPE,VALUETYPE>,ICommonsNavigableMap<KEYTYPE,VALUETYPE>,ICommonsSortedMap<KEYTYPE,VALUETYPE>,ICloneable<ICommonsMap<KEYTYPE,VALUETYPE>>,Serializable,Cloneable,Map<KEYTYPE,VALUETYPE>,NavigableMap<KEYTYPE,VALUETYPE>,SortedMap<KEYTYPE,VALUETYPE>
public class CommonsTreeMap<KEYTYPE,VALUETYPE> extends TreeMap<KEYTYPE,VALUETYPE> implements ICommonsNavigableMap<KEYTYPE,VALUETYPE>
A specialTreeMapimplementation based onICommonsNavigableMap.- Author:
- Philip Helger
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description CommonsTreeMap()CommonsTreeMap(Collection<? extends COLLTYPE> aValues, Function<? super COLLTYPE,? extends KEYTYPE> aKeyMapper, Function<? super COLLTYPE,? extends VALUETYPE> aValueMapper)CommonsTreeMap(Comparator<? super KEYTYPE> aComparator)CommonsTreeMap(Map<? extends KEYTYPE,? extends VALUETYPE> aMap)CommonsTreeMap(Map<? extends SRCKEYTYPE,? extends SRCVALUETYPE> aValues, Function<? super SRCKEYTYPE,? extends KEYTYPE> aKeyMapper, Function<? super SRCVALUETYPE,? extends VALUETYPE> aValueMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <K,V>
CommonsTreeMap<K,V>createInstance()Create a newCommonsTreeMap.CommonsTreeMap<KEYTYPE,VALUETYPE>getClone()-
Methods inherited from class java.util.TreeMap
ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, forEach, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, put, putAll, remove, replace, replace, replaceAll, size, subMap, subMap, tailMap, tailMap, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.helger.commons.collection.impl.ICommonsMap
addAll, containsAnyEntry, containsAnyKey, containsAnyValue, copyOfValues, copyOfValues, copyOfValuesMapped, copyOfValuesMapped, findFirstEntry, findFirstKey, findFirstValue, forEach, forEachKey, forEachKey, forEachValue, forEachValue, getFirstEntry, getFirstEntry, getFirstKey, getFirstValue, getSortedByKey, getSortedByValue, getSwappedKeyValues, isNotEmpty, put, putAll, putAll, putAllMapped, putAllMapped, putAllMapped, putIf, putIfNotNull, removeAll, removeIf, removeIfKey, removeIfValue, removeObject, setAll
-
Methods inherited from interface com.helger.commons.collection.impl.ICommonsNavigableMap
getAsUnmodifiable
-
Methods inherited from interface com.helger.commons.collection.impl.ICommonsSortedMap
copyOfEntrySet, copyOfKeySet, copyOfKeySet, getFirstKey, getFirstValue, getLastKey, getLastKey, getLastValue, getLastValue
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, get, getOrDefault, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size
-
Methods inherited from interface java.util.NavigableMap
ceilingEntry, ceilingKey, descendingKeySet, descendingMap, firstEntry, floorEntry, floorKey, headMap, headMap, higherEntry, higherKey, lastEntry, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, subMap, subMap, tailMap, tailMap
-
-
-
-
Constructor Detail
-
CommonsTreeMap
public CommonsTreeMap()
-
CommonsTreeMap
public CommonsTreeMap(@Nullable Comparator<? super KEYTYPE> aComparator)
-
CommonsTreeMap
public CommonsTreeMap(@Nullable Collection<? extends COLLTYPE> aValues, @Nonnull Function<? super COLLTYPE,? extends KEYTYPE> aKeyMapper, @Nonnull Function<? super COLLTYPE,? extends VALUETYPE> aValueMapper)
-
-
Method Detail
-
createInstance
@Nonnull @ReturnsMutableCopy public <K,V> CommonsTreeMap<K,V> createInstance()
Description copied from interface:ICommonsSortedMapCreate a newCommonsTreeMap.- Specified by:
createInstancein interfaceICommonsMap<KEYTYPE,VALUETYPE>- Specified by:
createInstancein interfaceICommonsSortedMap<KEYTYPE,VALUETYPE>- Type Parameters:
K- Map key typeV- Map value type- Returns:
- A new empty map. Never
null.
-
getClone
@Nonnull @ReturnsMutableCopy public CommonsTreeMap<KEYTYPE,VALUETYPE> getClone()
- Specified by:
getClonein interfaceICloneable<KEYTYPE>- Specified by:
getClonein interfaceICommonsNavigableMap<KEYTYPE,VALUETYPE>- Specified by:
getClonein interfaceICommonsSortedMap<KEYTYPE,VALUETYPE>- Returns:
- A 100% deep-copy of the implementing class.
-
-