KeyType
- Type of key in the Mappublic class AbstractLogNumberMap<KeyType> extends AbstractScalarMap<KeyType,LogNumber>
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractLogNumberMap.SimpleEntry<KeyType>
Entry for the AbstractScalarMap
|
protected static class |
AbstractLogNumberMap.SimpleEntrySet<KeyType>
Simple Entry Set for DefaultInfiniteVector
|
protected static class |
AbstractLogNumberMap.SimpleIterator<KeyType>
Simple iterator for DefaultInfiniteVector
|
ScalarMap.Entry<KeyType>
map
Constructor and Description |
---|
AbstractLogNumberMap(java.util.Map<KeyType,LogNumber> map)
Creates a new instance of AbstractMutableDoubleMap
|
Modifier and Type | Method and Description |
---|---|
AbstractLogNumberMap<KeyType> |
clone()
This makes public the clone method on the
Object class and
removes the exception that it throws. |
AbstractLogNumberMap.SimpleEntrySet<KeyType> |
entrySet()
Gets the set of entries in this scalar map.
|
double |
get(KeyType key)
Gets the value associated with a given key.
|
LogNumber |
getLog(KeyType key)
Gets the LogNumber at the given key
|
void |
set(KeyType key,
double value)
Sets the value associated with a given key.
|
void |
setLog(KeyType key,
LogNumber logValue)
Sets the LogNumber at the given key
|
asMap, clear, containsKey, decrement, decrement, decrementAll, decrementAll, getMaxValue, getMaxValueKey, getMaxValueKeys, getMinValue, getMinValueKey, getMinValueKeys, increment, increment, incrementAll, incrementAll, isEmpty, keySet, setAll, setAll, size
public AbstractLogNumberMap<KeyType> clone()
AbstractCloneableSerializable
Object
class and
removes the exception that it throws. Its default behavior is to
automatically create a clone of the exact type of object that the
clone is called on and to copy all primitives but to keep all references,
which means it is a shallow copy.
Extensions of this class may want to override this method (but call
super.clone()
to implement a "smart copy". That is, to target
the most common use case for creating a copy of the object. Because of
the default behavior being a shallow copy, extending classes only need
to handle fields that need to have a deeper copy (or those that need to
be reset). Some of the methods in ObjectUtil
may be helpful in
implementing a custom clone method.
Note: The contract of this method is that you must use
super.clone()
as the basis for your implementation.clone
in interface CloneableSerializable
clone
in class AbstractScalarMap<KeyType,LogNumber>
public double get(KeyType key)
ScalarMap
key
- A key.public LogNumber getLog(KeyType key)
key
- Key to get from the Mappublic void set(KeyType key, double value)
ScalarMap
key
- A key.value
- The value to associate with the key.public void setLog(KeyType key, LogNumber logValue)
key
- Key to set into the MaplogValue
- Sets the LogNumber into the Mappublic AbstractLogNumberMap.SimpleEntrySet<KeyType> entrySet()
ScalarMap