gov.sandia.cognition.collection
Class AbstractMutableDoubleMap.SimpleEntry<KeyType>

java.lang.Object
  extended by gov.sandia.cognition.collection.AbstractMutableDoubleMap.SimpleEntry<KeyType>
Type Parameters:
KeyType - The type of the key in the map.
All Implemented Interfaces:
ScalarMap.Entry<KeyType>, InfiniteVector.Entry<KeyType>, VectorSpace.Entry
Enclosing class:
AbstractMutableDoubleMap<KeyType>

protected static class AbstractMutableDoubleMap.SimpleEntry<KeyType>
extends Object
implements ScalarMap.Entry<KeyType>, InfiniteVector.Entry<KeyType>

Entry for the AbstractScalarMap


Field Summary
protected  KeyType key
          Key associated with this entry
protected  MutableDouble value
          Value associated with the entry
 
Constructor Summary
AbstractMutableDoubleMap.SimpleEntry(KeyType key, MutableDouble value)
          Creates a new instance of SimpleEntry
 
Method Summary
 KeyType getKey()
          Gets the key.
 double getValue()
          Gets the value associated with the key.
 void setValue(double value)
          Sets the value associated with the key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

key

protected KeyType key
Key associated with this entry


value

protected MutableDouble value
Value associated with the entry

Constructor Detail

AbstractMutableDoubleMap.SimpleEntry

public AbstractMutableDoubleMap.SimpleEntry(KeyType key,
                                            MutableDouble value)
Creates a new instance of SimpleEntry

Parameters:
key - Key represented by the Entry
value - Value associated with the Entry
Method Detail

getKey

public KeyType getKey()
Description copied from interface: ScalarMap.Entry
Gets the key.

Specified by:
getKey in interface ScalarMap.Entry<KeyType>
Returns:
The key.

getValue

public double getValue()
Description copied from interface: ScalarMap.Entry
Gets the value associated with the key.

Specified by:
getValue in interface ScalarMap.Entry<KeyType>
Specified by:
getValue in interface VectorSpace.Entry
Returns:
The value.

setValue

public void setValue(double value)
Description copied from interface: ScalarMap.Entry
Sets the value associated with the key. Optional operation.

Specified by:
setValue in interface ScalarMap.Entry<KeyType>
Specified by:
setValue in interface VectorSpace.Entry
Parameters:
value - The value.