it.unimi.dsi.fastutil.floats
Interface Float2FloatMap

All Superinterfaces:
Float2FloatFunction, Function<Float,Float>, Map<Float,Float>
All Known Subinterfaces:
Float2FloatSortedMap
All Known Implementing Classes:
AbstractFloat2FloatMap, AbstractFloat2FloatSortedMap, Float2FloatArrayMap, Float2FloatAVLTreeMap, Float2FloatLinkedOpenHashMap, Float2FloatMaps.EmptyMap, Float2FloatMaps.Singleton, Float2FloatMaps.SynchronizedMap, Float2FloatMaps.UnmodifiableMap, Float2FloatOpenHashMap, Float2FloatRBTreeMap, Float2FloatSortedMaps.EmptySortedMap, Float2FloatSortedMaps.Singleton, Float2FloatSortedMaps.SynchronizedSortedMap, Float2FloatSortedMaps.UnmodifiableSortedMap

public interface Float2FloatMap
extends Float2FloatFunction, Map<Float,Float>

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 Float2FloatMap.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 Float2FloatMap.Entry
          A type-specific Map.Entry; provides some additional methods that use polymorphism to avoid (un)boxing.
static interface Float2FloatMap.FastEntrySet
          An entry set providing fast iteration.
 
Method Summary
 boolean containsValue(float value)
           
 ObjectSet<Map.Entry<Float,Float>> entrySet()
          Returns a set view of the mappings contained in this map.
 ObjectSet<Float2FloatMap.Entry> float2FloatEntrySet()
          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.
 FloatCollection values()
          Returns a set view of the values contained in this map.
 
Methods inherited from interface it.unimi.dsi.fastutil.floats.Float2FloatFunction
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,Float>> 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,Float>
Returns:
a set view of the mappings contained in this map.
See Also:
Map.entrySet()

float2FloatEntrySet

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

values

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

containsValue

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