it.unimi.dsi.fastutil.shorts
Class AbstractShort2LongSortedMap

java.lang.Object
  extended by it.unimi.dsi.fastutil.shorts.AbstractShort2LongFunction
      extended by it.unimi.dsi.fastutil.shorts.AbstractShort2LongMap
          extended by it.unimi.dsi.fastutil.shorts.AbstractShort2LongSortedMap
All Implemented Interfaces:
Function<Short,Long>, Short2LongFunction, Short2LongMap, Short2LongSortedMap, Serializable, Map<Short,Long>, SortedMap<Short,Long>
Direct Known Subclasses:
Short2LongAVLTreeMap, Short2LongLinkedOpenHashMap, Short2LongRBTreeMap

public abstract class AbstractShort2LongSortedMap
extends AbstractShort2LongMap
implements Short2LongSortedMap

An abstract class providing basic methods for sorted maps implementing a type-specific interface.

See Also:
Serialized Form

Nested Class Summary
protected  class AbstractShort2LongSortedMap.KeySet
          A wrapper exhibiting the keys of a map.
protected static class AbstractShort2LongSortedMap.KeySetIterator
          A wrapper exhibiting a map iterator as an iterator on keys.
protected  class AbstractShort2LongSortedMap.ValuesCollection
          A wrapper exhibiting the values of a map.
protected static class AbstractShort2LongSortedMap.ValuesIterator
          A wrapper exhibiting a map iterator as an iterator on values.
 
Nested classes/interfaces inherited from class it.unimi.dsi.fastutil.shorts.AbstractShort2LongMap
AbstractShort2LongMap.BasicEntry
 
Nested classes/interfaces inherited from interface it.unimi.dsi.fastutil.shorts.Short2LongSortedMap
Short2LongSortedMap.FastSortedEntrySet
 
Nested classes/interfaces inherited from interface it.unimi.dsi.fastutil.shorts.Short2LongMap
Short2LongMap.Entry, Short2LongMap.FastEntrySet
 
Field Summary
static long serialVersionUID
           
 
Fields inherited from class it.unimi.dsi.fastutil.shorts.AbstractShort2LongFunction
defRetValue
 
Constructor Summary
protected AbstractShort2LongSortedMap()
           
 
Method Summary
 ObjectSortedSet<Map.Entry<Short,Long>> entrySet()
          Returns a set view of the mappings contained in this map.
 Short firstKey()
          Delegates to the corresponding type-specific method.
 Short2LongSortedMap headMap(Short to)
          Delegates to the corresponding type-specific method.
 ShortSortedSet keySet()
          Returns a type-specific-sorted-set view of the keys of this map.
 Short lastKey()
          Delegates to the corresponding type-specific method.
 Short2LongSortedMap subMap(Short from, Short to)
          Delegates to the corresponding type-specific method.
 Short2LongSortedMap tailMap(Short from)
          Delegates to the corresponding type-specific method.
 LongCollection values()
          Returns a type-specific collection view of the values contained in this map.
 
Methods inherited from class it.unimi.dsi.fastutil.shorts.AbstractShort2LongMap
containsKey, containsValue, containsValue, equals, hashCode, isEmpty, putAll, toString
 
Methods inherited from class it.unimi.dsi.fastutil.shorts.AbstractShort2LongFunction
clear, containsKey, defaultReturnValue, defaultReturnValue, get, put, put, remove, remove
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface it.unimi.dsi.fastutil.shorts.Short2LongSortedMap
comparator, firstShortKey, headMap, lastShortKey, short2LongEntrySet, subMap, tailMap
 
Methods inherited from interface it.unimi.dsi.fastutil.shorts.Short2LongMap
containsValue
 
Methods inherited from interface it.unimi.dsi.fastutil.shorts.Short2LongFunction
containsKey, defaultReturnValue, defaultReturnValue, get, put, remove
 
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
 

Field Detail

serialVersionUID

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

AbstractShort2LongSortedMap

protected AbstractShort2LongSortedMap()
Method Detail

headMap

public Short2LongSortedMap headMap(Short to)
Delegates to the corresponding type-specific method.

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

tailMap

public Short2LongSortedMap tailMap(Short from)
Delegates to the corresponding type-specific method.

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

subMap

public Short2LongSortedMap subMap(Short from,
                                  Short to)
Delegates to the corresponding type-specific method.

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

firstKey

public Short firstKey()
Delegates to the corresponding type-specific method.

Specified by:
firstKey in interface SortedMap<Short,Long>

lastKey

public Short lastKey()
Delegates to the corresponding type-specific method.

Specified by:
lastKey in interface SortedMap<Short,Long>

keySet

public ShortSortedSet keySet()
Returns a type-specific-sorted-set view of the keys of this map.

The view is backed by the sorted set returned by entrySet(). Note that no attempt is made at caching the result of this method, as this would require adding some attributes that lightweight implementations would not need. Subclasses may easily override this policy by calling this method and caching the result, but implementors are encouraged to write more efficient ad-hoc implementations.

Specified by:
keySet in interface Short2LongMap
Specified by:
keySet in interface Short2LongSortedMap
Specified by:
keySet in interface Map<Short,Long>
Specified by:
keySet in interface SortedMap<Short,Long>
Overrides:
keySet in class AbstractShort2LongMap
Returns:
a sorted set view of the keys of this map; it may be safely cast to a type-specific interface.
See Also:
Map.keySet()

values

public LongCollection values()
Returns a type-specific collection view of the values contained in this map.

The view is backed by the sorted set returned by entrySet(). Note that no attempt is made at caching the result of this method, as this would require adding some attributes that lightweight implementations would not need. Subclasses may easily override this policy by calling this method and caching the result, but implementors are encouraged to write more efficient ad-hoc implementations.

Specified by:
values in interface Short2LongMap
Specified by:
values in interface Short2LongSortedMap
Specified by:
values in interface Map<Short,Long>
Specified by:
values in interface SortedMap<Short,Long>
Overrides:
values in class AbstractShort2LongMap
Returns:
a type-specific collection view of the values contained in this map.
See Also:
Map.values()

entrySet

public ObjectSortedSet<Map.Entry<Short,Long>> entrySet()
Description copied from interface: Short2LongMap
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 Short2LongMap
Specified by:
entrySet in interface Short2LongSortedMap
Specified by:
entrySet in interface Map<Short,Long>
Specified by:
entrySet in interface SortedMap<Short,Long>
Overrides:
entrySet in class AbstractShort2LongMap
Returns:
a set view of the mappings contained in this map.
See Also:
Map.entrySet()


Copyright © 2011. All Rights Reserved.