- java.lang.Object
-
- com.ibm.dtfj.corereaders.zos.util.AbstractHashMap
-
- com.ibm.dtfj.corereaders.zos.util.ObjectMap
-
- All Implemented Interfaces:
Serializable
public final class ObjectMap extends AbstractHashMap
This is a simple class to map an integer key to an object value. It has a smaller footprint than the various standard Java classes owing to the use of open addressing (see description ofAbstractHashMap
).- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ObjectMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
get(long key)
Returns the value mapped by the given key.void
put(long key, Object value)
Add the key/value pair to the map.Object
remove(long key)
Remove the key from the map and return the old value.Object[]
toArray(Object[] a)
Returns an array containing the values where the returned runtime array type is derived from the given array (or the given array is simply reused if there is room).-
Methods declared in class com.ibm.dtfj.corereaders.zos.util.AbstractHashMap
getKeys, getKeysArray
-
-
-
-
Method Detail
-
get
public Object get(long key)
Returns the value mapped by the given key.- Returns:
- the value or null if it cannot be found
-
put
public void put(long key, Object value)
Add the key/value pair to the map.
-
remove
public Object remove(long key)
Remove the key from the map and return the old value.
-
-