it.unimi.dsi.fastutil.floats
Interface Float2ShortMap

All Superinterfaces:
Float2ShortFunction, Function<Float,Short>, Map<Float,Short>
All Known Subinterfaces:
Float2ShortSortedMap
All Known Implementing Classes:
AbstractFloat2ShortMap, AbstractFloat2ShortSortedMap, Float2ShortArrayMap, Float2ShortAVLTreeMap, Float2ShortLinkedOpenHashMap, Float2ShortMaps.EmptyMap, Float2ShortMaps.Singleton, Float2ShortMaps.SynchronizedMap, Float2ShortMaps.UnmodifiableMap, Float2ShortOpenHashMap, Float2ShortRBTreeMap, Float2ShortSortedMaps.EmptySortedMap, Float2ShortSortedMaps.Singleton, Float2ShortSortedMaps.SynchronizedSortedMap, Float2ShortSortedMaps.UnmodifiableSortedMap

public interface Float2ShortMap
extends Float2ShortFunction, Map<Float,Short>

A type-specific Map; provides some additional methods that use polymorphism to avoid (un)boxing, and handling of a default return value.

Besides extending the corresponding type-specific function, this interface strengthens entrySet(), keySet() and values(). Maps returning entry sets of type Float2ShortMap.FastEntrySet support also fast iteration.

A submap or subset may or may not have an independent default return value (which however must be initialized to the default return value of the originator).

See Also:
Map

Nested Class Summary
static interface Float2ShortMap.Entry
          A type-specific Map.Entry; provides some additional methods that use polymorphism to avoid (un)boxing.
static interface Float2ShortMap.FastEntrySet
          An entry set providing fast iteration.
 
Method Summary
 boolean containsValue(short value)
           
 ObjectSet<Map.Entry<Float,Short>> entrySet()
          Returns a set view of the mappings contained in this map.
 ObjectSet<Float2ShortMap.Entry> float2ShortEntrySet()
          Returns a type-specific set view of the mappings contained in this map.
 FloatSet keySet()
          Returns a set view of the keys contained in this map.
 ShortCollection values()
          Returns a set view of the values contained in this map.
 
Methods inherited from interface it.unimi.dsi.fastutil.floats.Float2ShortFunction
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
 

Method Detail

entrySet

ObjectSet<Map.Entry<Float,Short>> entrySet()
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 Map<Float,Short>
Returns:
a set view of the mappings contained in this map.
See Also:
Map.entrySet()

float2ShortEntrySet

ObjectSet<Float2ShortMap.Entry> float2ShortEntrySet()
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 entrySet() so that it returns an ObjectSet of objects of type Float2ShortMap.Entry (the latter makes it possible to access keys and values with type-specific methods).

Returns:
a type-specific set view of the mappings contained in this map.
See Also:
entrySet()

keySet

FloatSet keySet()
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 Map<Float,Short>
Returns:
a set view of the keys contained in this map.
See Also:
Map.keySet()

values

ShortCollection values()
Returns a set view of the values contained in this map.

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

Specified by:
values in interface Map<Float,Short>
Returns:
a set view of the values contained in this map.
See Also:
Map.values()

containsValue

boolean containsValue(short value)
See Also:
Map.containsValue(Object)