org.npsnet.xrti
Class XRTIAttributeHandleValueMap

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
          extended byorg.npsnet.xrti.XRTIAttributeHandleValueMap
All Implemented Interfaces:
AttributeHandleValueMap, java.lang.Cloneable, java.util.Map, java.io.Serializable

public class XRTIAttributeHandleValueMap
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 Class Summary
 
Nested classes inherited from class java.util.HashMap
 
Nested classes inherited from class java.util.AbstractMap
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
 
Fields inherited from class java.util.HashMap
 
Fields inherited from class java.util.AbstractMap
 
Constructor Summary
protected XRTIAttributeHandleValueMap(int capacity)
          Constructor.
 
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
 

Constructor Detail

XRTIAttributeHandleValueMap

protected XRTIAttributeHandleValueMap(int capacity)
Constructor.

Parameters:
capacity - the initial map capacity
Method Detail

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
Parameters:
key - the key object
value - 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
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
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