K - the key typeV - the value typepublic class SortedListMap<K extends Comparable<K>,V> extends ListMap<K,V>
Map that uses a List to hold the entries in sorted
order. The keys are required to implement Comparable.ListMap.Entry<KK,VV>| Constructor and Description |
|---|
SortedListMap()
Construct an empty
SortedListMap. |
SortedListMap(int capacity)
Construct an empty
SortedListMap with a specified initial capacity. |
SortedListMap(Map<? extends K,? extends V> m)
Construct a
SortedListMap with the contents of another Map. |
| Modifier and Type | Method and Description |
|---|---|
protected int |
findIndex(Object key)
Find the index for the specified key.
|
V |
put(K key,
V value)
Store a value in the
ListMap with the specified key. |
clear, containsKey, containsValue, entrySet, equals, get, getEntry, hashCode, isEmpty, keySet, putAll, remove, size, toString, valuesclone, finalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic SortedListMap()
SortedListMap.public SortedListMap(int capacity)
SortedListMap with a specified initial capacity.capacity - the initial capacitypublic V put(K key, V value)
ListMap with the specified key.put in interface Map<K extends Comparable<K>,V>put in class ListMap<K extends Comparable<K>,V>key - the keyvalue - the valuenull if no previous
valueMap.put(Object, Object)Copyright © 2020. All rights reserved.