it.unimi.dsi.fastutil.doubles
Class AbstractDouble2DoubleMap

java.lang.Object
  extended byit.unimi.dsi.fastutil.doubles.AbstractDouble2DoubleMap
All Implemented Interfaces:
Double2DoubleMap, Map, Serializable
Direct Known Subclasses:
Double2DoubleAVLTreeMap, Double2DoubleLinkedOpenHashMap, Double2DoubleOpenHashMap, Double2DoubleRBTreeMap

public abstract class AbstractDouble2DoubleMap
extends Object
implements Double2DoubleMap, Serializable

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

In particular, this class provide containsKey(Object) and containsValue(Object) methods that just call the type-specific counterpart.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class it.unimi.dsi.fastutil.doubles.Double2DoubleMap
Double2DoubleMap.Entry
 
Method Summary
 boolean containsKey(Object ok)
          Delegates to the corresponding type-specific method.
 boolean containsValue(Object ov)
          Delegates to the corresponding type-specific method.
 double defaultReturnValue()
          Gets the default return value.
 void defaultReturnValue(double rv)
          Sets the default return value.
 boolean equals(Object o)
           
 double getDefRetValue()
          Gets the default return value.
 int hashCode()
          Returns a hash code for this map.
 void putAll(Map m)
          Puts all pairs in the given map.
 void setDefRetValue(double rv)
          Sets the default return value.
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface it.unimi.dsi.fastutil.doubles.Double2DoubleMap
containsKey, containsValue, get, put, remove
 
Methods inherited from interface java.util.Map
clear, entrySet, get, isEmpty, keySet, put, remove, size, values
 

Method Detail

containsKey

public boolean containsKey(Object ok)
Delegates to the corresponding type-specific method.

Specified by:
containsKey in interface Map

containsValue

public boolean containsValue(Object ov)
Delegates to the corresponding type-specific method.

Specified by:
containsValue in interface Map

setDefRetValue

public void setDefRetValue(double rv)
Description copied from interface: Double2DoubleMap
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.

Specified by:
setDefRetValue in interface Double2DoubleMap
Parameters:
rv - the new default return value.
See Also:
Double2DoubleMap.getDefRetValue(), Double2DoubleMap.defaultReturnValue()

getDefRetValue

public double getDefRetValue()
Description copied from interface: Double2DoubleMap
Gets the default return value.

Specified by:
getDefRetValue in interface Double2DoubleMap
Returns:
the current default return value.
See Also:
Double2DoubleMap.defaultReturnValue()

defaultReturnValue

public void defaultReturnValue(double rv)
Description copied from interface: Double2DoubleMap
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.

Specified by:
defaultReturnValue in interface Double2DoubleMap
Parameters:
rv - the new default return value.
See Also:
Double2DoubleMap.defaultReturnValue()

defaultReturnValue

public double defaultReturnValue()
Description copied from interface: Double2DoubleMap
Gets the default return value.

Specified by:
defaultReturnValue in interface Double2DoubleMap
Returns:
the current default return value.

putAll

public void putAll(Map m)
Puts all pairs in the given map. If the map implements the interface of this map, it uses the faster iterators.

Specified by:
putAll in interface Map
Parameters:
m - a map.

hashCode

public int hashCode()
Returns a hash code for this map. The hash code of a map is computed by summing the hash codes of its entries.

Specified by:
hashCode in interface Map
Returns:
a hash code for this map.

equals

public boolean equals(Object o)
Specified by:
equals in interface Map

toString

public String toString()