it.unimi.dsi.fastutil.objects
Class Reference2LongSortedMaps.EmptySortedMap<K>

java.lang.Object
  extended by it.unimi.dsi.fastutil.objects.AbstractReference2LongFunction<K>
      extended by it.unimi.dsi.fastutil.objects.Reference2LongFunctions.EmptyFunction<K>
          extended by it.unimi.dsi.fastutil.objects.Reference2LongMaps.EmptyMap<K>
              extended by it.unimi.dsi.fastutil.objects.Reference2LongSortedMaps.EmptySortedMap<K>
All Implemented Interfaces:
Function<K,Long>, Reference2LongFunction<K>, Reference2LongMap<K>, Reference2LongSortedMap<K>, Serializable, Cloneable, Map<K,Long>, SortedMap<K,Long>
Enclosing class:
Reference2LongSortedMaps

public static class Reference2LongSortedMaps.EmptySortedMap<K>
extends Reference2LongMaps.EmptyMap<K>
implements Reference2LongSortedMap<K>, Serializable, Cloneable

An immutable class representing an empty type-specific sorted map.

This class may be useful to implement your own in case you subclass a type-specific sorted map.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface it.unimi.dsi.fastutil.objects.Reference2LongSortedMap
Reference2LongSortedMap.FastSortedEntrySet<K>
 
Nested classes/interfaces inherited from interface it.unimi.dsi.fastutil.objects.Reference2LongMap
Reference2LongMap.Entry<K>, Reference2LongMap.FastEntrySet<K>
 
Field Summary
static long serialVersionUID
           
 
Method Summary
 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,Long>> entrySet()
          Returns a set view of the mappings contained in this map.
 K firstKey()
           
 Reference2LongSortedMap<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<Reference2LongMap.Entry<K>> reference2LongEntrySet()
          Returns a type-specific set view of the mappings contained in this map.
 Reference2LongSortedMap<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.
 Reference2LongSortedMap<K> tailMap(K from)
          Returns a view of the portion of this sorted map whose keys are greater than or equal to fromKey.
 
Methods inherited from class it.unimi.dsi.fastutil.objects.Reference2LongMaps.EmptyMap
clone, containsValue, containsValue, equals, hashCode, isEmpty, putAll, toString, values
 
Methods inherited from class it.unimi.dsi.fastutil.objects.Reference2LongFunctions.EmptyFunction
clear, containsKey, defaultReturnValue, defaultReturnValue, getLong, size
 
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractReference2LongFunction
get, put, put, remove, removeLong
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface it.unimi.dsi.fastutil.objects.Reference2LongSortedMap
values
 
Methods inherited from interface it.unimi.dsi.fastutil.objects.Reference2LongMap
containsValue
 
Methods inherited from interface it.unimi.dsi.fastutil.objects.Reference2LongFunction
defaultReturnValue, defaultReturnValue, getLong, put, removeLong
 
Methods inherited from interface it.unimi.dsi.fastutil.Function
clear, containsKey, get, put, remove, size
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, put, putAll, remove, size
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, put, putAll, remove, size
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Method Detail

comparator

public Comparator<? super K> comparator()
Description copied from interface: Reference2LongSortedMap
Returns the comparator associated with this sorted set, or null if it uses its keys' natural ordering.

Note that this specification strengthens the one given in SortedMap.comparator().

Specified by:
comparator in interface Reference2LongSortedMap<K>
Specified by:
comparator in interface SortedMap<K,Long>
See Also:
SortedMap.comparator()

reference2LongEntrySet

public ObjectSortedSet<Reference2LongMap.Entry<K>> reference2LongEntrySet()
Description copied from interface: Reference2LongMap
Returns a type-specific set view of the mappings contained in this map.

This method is necessary because there is no inheritance along type parameters: it is thus impossible to strengthen Reference2LongMap.entrySet() so that it returns an ObjectSet of objects of type Reference2LongMap.Entry (the latter makes it possible to access keys and values with type-specific methods).

Specified by:
reference2LongEntrySet in interface Reference2LongMap<K>
Specified by:
reference2LongEntrySet in interface Reference2LongSortedMap<K>
Overrides:
reference2LongEntrySet in class Reference2LongMaps.EmptyMap<K>
Returns:
a type-specific set view of the mappings contained in this map.
See Also:
Reference2LongMap.entrySet()

entrySet

public ObjectSortedSet<Map.Entry<K,Long>> entrySet()
Description copied from interface: Reference2LongMap
Returns a set view of the mappings contained in this map.

Note that this specification strengthens the one given in Map.entrySet().

Specified by:
entrySet in interface Reference2LongMap<K>
Specified by:
entrySet in interface Reference2LongSortedMap<K>
Specified by:
entrySet in interface Map<K,Long>
Overrides:
entrySet in class Reference2LongMaps.EmptyMap<K>
Returns:
a set view of the mappings contained in this map.
See Also:
Map.entrySet()

keySet

public ReferenceSortedSet<K> keySet()
Description copied from interface: Reference2LongMap
Returns a set view of the keys contained in this map.

Note that this specification strengthens the one given in Map.keySet().

Specified by:
keySet in interface Reference2LongMap<K>
Specified by:
keySet in interface Reference2LongSortedMap<K>
Specified by:
keySet in interface Map<K,Long>
Overrides:
keySet in class Reference2LongMaps.EmptyMap<K>
Returns:
a set view of the keys contained in this map.
See Also:
Map.keySet()

subMap

public Reference2LongSortedMap<K> subMap(K from,
                                         K to)
Description copied from interface: Reference2LongSortedMap
Returns a view of the portion of this sorted map whose keys range from fromKey, inclusive, to toKey, exclusive.

Note that this specification strengthens the one given in SortedMap.subMap(Object,Object).

Specified by:
subMap in interface Reference2LongSortedMap<K>
Specified by:
subMap in interface SortedMap<K,Long>
See Also:
SortedMap.subMap(Object,Object)

headMap

public Reference2LongSortedMap<K> headMap(K to)
Description copied from interface: Reference2LongSortedMap
Returns a view of the portion of this sorted map whose keys are strictly less than toKey.

Note that this specification strengthens the one given in SortedMap.headMap(Object).

Specified by:
headMap in interface Reference2LongSortedMap<K>
Specified by:
headMap in interface SortedMap<K,Long>
See Also:
SortedMap.headMap(Object)

tailMap

public Reference2LongSortedMap<K> tailMap(K from)
Description copied from interface: Reference2LongSortedMap
Returns a view of the portion of this sorted map whose keys are greater than or equal to fromKey.

Note that this specification strengthens the one given in SortedMap.tailMap(Object).

Specified by:
tailMap in interface Reference2LongSortedMap<K>
Specified by:
tailMap in interface SortedMap<K,Long>
See Also:
SortedMap.tailMap(Object)

firstKey

public K firstKey()
Specified by:
firstKey in interface SortedMap<K,Long>

lastKey

public K lastKey()
Specified by:
lastKey in interface SortedMap<K,Long>