public abstract class AbstractSortedMap<K,V> extends AbstractMap<K,V> implements SortedMap<K,V>
AbstractMap.MapEntry<K,V>
Modifier | Constructor and Description |
---|---|
protected |
AbstractSortedMap()
Initializes the map with a default comparator.
|
protected |
AbstractSortedMap(Comparator<K> c)
Initializes the comparator for the map.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkKey(K key)
Determines whether a key is valid.
|
protected int |
compare(Entry<K,V> a,
Entry<K,V> b)
Method for comparing two entries according to key
|
protected int |
compare(Entry<K,V> a,
K b)
Method for comparing a key and an entry's key
|
protected int |
compare(K a,
Entry<K,V> b)
Method for comparing a key and an entry's key
|
protected int |
compare(K a,
K b)
Method for comparing two keys
|
isEmpty, keySet, values
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
ceilingEntry, firstEntry, floorEntry, higherEntry, lastEntry, lowerEntry, subMap
protected AbstractSortedMap(Comparator<K> c)
c
- comparator defining the order of keys in the mapprotected AbstractSortedMap()
protected int compare(Entry<K,V> a, Entry<K,V> b)
protected boolean checkKey(K key) throws IllegalArgumentException
IllegalArgumentException