it.unimi.dsi.fastutil.longs
Interface Long2FloatMap

All Superinterfaces:
Map
All Known Subinterfaces:
Long2FloatSortedMap
All Known Implementing Classes:
AbstractLong2FloatMap, Long2FloatAVLTreeMap, Long2FloatLinkedOpenHashMap, Long2FloatOpenHashMap, Long2FloatRBTreeMap

public interface Long2FloatMap
extends Map

A type-specific Map; provides some additional methods that use polymorphism to reduce type juggling.

See Also:
Map

Nested Class Summary
static interface Long2FloatMap.Entry
          A type-specific Map.Entry; provides some additional methods to access its content reducing type juggling.
 
Method Summary
 boolean containsKey(long key)
           
 boolean containsValue(float value)
           
 float defaultReturnValue()
          Gets the default return value.
 void defaultReturnValue(float rv)
          Sets the default return value.
 float get(long key)
          Returns the value to which the given key is mapped.
 float getDefRetValue()
          Deprecated. As of fastutil 2.0, replaced by defaultReturnValue().
 float put(long key, float value)
          Adds a pair to the map.
 float remove(long key)
          Removes the mapping with the given key.
 void setDefRetValue(float rv)
          Deprecated. As of fastutil 2.0, replaced by defaultReturnValue().
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Method Detail

put

public float put(long key,
                 float value)
Adds a pair to the map.

Parameters:
key - the key.
value - the value.
Returns:
the old value, or the default return value if no value was present for the given key.
See Also:
Map.put(Object,Object)

get

public float get(long key)
Returns the value to which the given key is mapped.

Parameters:
key - the key.
Returns:
the corresponding value, or the default return value if no value was present for the given key.
See Also:
Map.get(Object)

remove

public float remove(long key)
Removes the mapping with the given key.

Parameters:
key -
Returns:
the old value, or the default return value if no value was present for the given key.
See Also:
Map.remove(Object)

containsKey

public boolean containsKey(long key)
See Also:
Map.containsKey(Object)

containsValue

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

setDefRetValue

public void setDefRetValue(float rv)
Deprecated. As of fastutil 2.0, replaced by defaultReturnValue().

Sets the default return value. This value is returned by get(), put() and remove() to denote that the map does not contain the specified key. It is 0/false/null by default.

Parameters:
rv - the new default return value.
See Also:
getDefRetValue(), defaultReturnValue()

getDefRetValue

public float getDefRetValue()
Deprecated. As of fastutil 2.0, replaced by defaultReturnValue().

Gets the default return value.

Returns:
the current default return value.
See Also:
defaultReturnValue()

defaultReturnValue

public void defaultReturnValue(float rv)
Sets the default return value. This value is returned by get(), put() and remove() to denote that the map does not contain the specified key. It is 0/false/null by default.

Parameters:
rv - the new default return value.
See Also:
defaultReturnValue()

defaultReturnValue

public float defaultReturnValue()
Gets the default return value.

Returns:
the current default return value.