K
- The type of the key objects for this DefaultMapV
- The type of the value objects for this DefaultMappublic class DefaultMap<K,V>
extends java.util.HashMap<K,V>
Constructor and Description |
---|
DefaultMap() |
Modifier and Type | Method and Description |
---|---|
V |
get(java.lang.Object key)
Gets the value mapped to a given key if there is a value for the key in
the Map.
|
V |
getDefaultValue()
Returns the default value (what is returned by the get method if a key is
not contained in the Map).
|
void |
setDefaultValue(V defaultValue)
Sets the default value (what is returned by the get method if a key is
not contained in the Map).
|
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, put, putAll, remove, size, values
public V get(java.lang.Object key)
public V getDefaultValue()
public void setDefaultValue(V defaultValue)
defaultValue
- the new default value for this Map