public static class Reference2IntSortedMaps.EmptySortedMap<K> extends Reference2IntMaps.EmptyMap<K> implements Reference2IntSortedMap<K>, Serializable, Cloneable
This class may be useful to implement your own in case you subclass a type-specific sorted map.
Reference2IntSortedMap.FastSortedEntrySet<K>
Reference2IntMap.Entry<K>, Reference2IntMap.FastEntrySet<K>
Modifier and Type | Method and Description |
---|---|
Comparator<? super K> |
comparator()
Returns the comparator associated with this sorted set, or null if it uses its keys' natural ordering.
|
ObjectSortedSet<Map.Entry<K,Integer>> |
entrySet()
Returns a set view of the mappings contained in this map.
|
K |
firstKey() |
Reference2IntSortedMap<K> |
headMap(K to)
Returns a view of the portion of this sorted map whose keys are strictly less than
toKey . |
ReferenceSortedSet<K> |
keySet()
Returns a set view of the keys contained in this map.
|
K |
lastKey() |
ObjectSortedSet<Reference2IntMap.Entry<K>> |
reference2IntEntrySet()
Returns a type-specific set view of the mappings contained in this map.
|
Reference2IntSortedMap<K> |
subMap(K from,
K to)
Returns a view of the portion of this sorted map whose keys range from
fromKey , inclusive, to toKey , exclusive. |
Reference2IntSortedMap<K> |
tailMap(K from)
Returns a view of the portion of this sorted map whose keys are greater than or equal to
fromKey . |
clone, containsValue, containsValue, equals, hashCode, isEmpty, putAll, toString, values
clear, containsKey, defaultReturnValue, defaultReturnValue, getInt, size
get, put, put, remove, removeInt
values
containsValue
defaultReturnValue, defaultReturnValue, getInt, put, removeInt
clear, containsKey, get, put, remove, size
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, get, getOrDefault, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size
public Comparator<? super K> comparator()
Reference2IntSortedMap
Note that this specification strengthens the one given in SortedMap.comparator()
.
comparator
in interface Reference2IntSortedMap<K>
comparator
in interface SortedMap<K,Integer>
SortedMap.comparator()
public ObjectSortedSet<Reference2IntMap.Entry<K>> reference2IntEntrySet()
Reference2IntMap
This method is necessary because there is no inheritance along type parameters: it is thus impossible to strengthen Reference2IntMap.entrySet()
so that it returns an
ObjectSet
of type-specific entries (the latter makes it possible to access keys and values with type-specific methods).
reference2IntEntrySet
in interface Reference2IntMap<K>
reference2IntEntrySet
in interface Reference2IntSortedMap<K>
reference2IntEntrySet
in class Reference2IntMaps.EmptyMap<K>
Reference2IntMap.entrySet()
public ObjectSortedSet<Map.Entry<K,Integer>> entrySet()
Reference2IntMap
Note that this specification strengthens the one given in Map.entrySet()
.
entrySet
in interface Reference2IntMap<K>
entrySet
in interface Reference2IntSortedMap<K>
entrySet
in interface Map<K,Integer>
entrySet
in interface SortedMap<K,Integer>
entrySet
in class Reference2IntMaps.EmptyMap<K>
Map.entrySet()
public ReferenceSortedSet<K> keySet()
Reference2IntMap
Note that this specification strengthens the one given in Map.keySet()
.
keySet
in interface Reference2IntMap<K>
keySet
in interface Reference2IntSortedMap<K>
keySet
in interface Map<K,Integer>
keySet
in interface SortedMap<K,Integer>
keySet
in class Reference2IntMaps.EmptyMap<K>
Map.keySet()
public Reference2IntSortedMap<K> subMap(K from, K to)
Reference2IntSortedMap
fromKey
, inclusive, to toKey
, exclusive.
Note that this specification strengthens the one given in SortedMap.subMap(Object,Object)
.
subMap
in interface Reference2IntSortedMap<K>
subMap
in interface SortedMap<K,Integer>
SortedMap.subMap(Object,Object)
public Reference2IntSortedMap<K> headMap(K to)
Reference2IntSortedMap
toKey
.
Note that this specification strengthens the one given in SortedMap.headMap(Object)
.
headMap
in interface Reference2IntSortedMap<K>
headMap
in interface SortedMap<K,Integer>
SortedMap.headMap(Object)
public Reference2IntSortedMap<K> tailMap(K from)
Reference2IntSortedMap
fromKey
.
Note that this specification strengthens the one given in SortedMap.tailMap(Object)
.
tailMap
in interface Reference2IntSortedMap<K>
tailMap
in interface SortedMap<K,Integer>
SortedMap.tailMap(Object)