org.eodisp.hla.common.handles
Class AttributeHandleValueMapImpl
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap
org.eodisp.hla.common.handles.AttributeHandleValueMapImpl
- All Implemented Interfaces:
- AttributeHandleValueMap, java.io.Serializable, java.lang.Cloneable, java.util.Map
public class AttributeHandleValueMapImpl
- extends java.util.HashMap
- implements AttributeHandleValueMap
Keys are AttributeHandles; values are byte[].
All operations are required, none optional. Null mappings are not allowed.
Methods put, putAll, and remove
should throw IllegalArgumentException to enforce types of keys
and mappings.
- Author:
- Andrzej Kapolka
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from class java.util.AbstractMap |
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
| Nested classes/interfaces inherited from interface java.util.Map |
java.util.Map.Entry<K,V> |
|
Method Summary |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Associates the specified value with the specified key. |
void |
putAll(java.util.Map t)
Adds all of the mappings contained in the specified map to this map. |
java.lang.Object |
remove(java.lang.Object key)
Removes the mapping associated with the specified key. |
| Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, size, values |
| Methods inherited from class java.util.AbstractMap |
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, size, values |
AttributeHandleValueMapImpl
public AttributeHandleValueMapImpl()
- Constructor
AttributeHandleValueMapImpl
protected AttributeHandleValueMapImpl(int capacity)
- Constructor.
- Parameters:
capacity - the initial map capacity
put
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
- Associates the specified value with the specified key.
- Specified by:
put in interface java.util.Map- Overrides:
put in class java.util.HashMap
- Parameters:
key - the key objectvalue - the value object
- Returns:
- the previous value associated with the specified key, or
null for none
- Throws:
java.lang.IllegalArgumentException - if the key is not a AttributeHandle or the
value is not a byte[]
putAll
public void putAll(java.util.Map t)
- Adds all of the mappings contained in the specified map to this map.
- Specified by:
putAll in interface java.util.Map- Overrides:
putAll in class java.util.HashMap
- Parameters:
t - the map whose mappings are to be added
- Throws:
java.lang.IllegalArgumentException - if the map is not an AttributeHandleValueMap
remove
public java.lang.Object remove(java.lang.Object key)
- Removes the mapping associated with the specified key.
- Specified by:
remove in interface java.util.Map- Overrides:
remove in class java.util.HashMap
- Parameters:
key - the key whose mapping is to be removed
- Returns:
- the value that was mapped to the specified key, or
null for none
- Throws:
java.lang.IllegalArgumentException - if the key is not an AttributeHandle