Class ObjectMap

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 of AbstractHashMap).
See Also:
  • Constructor Details

    • ObjectMap

      public ObjectMap()
  • Method Details

    • 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.
    • toArray

      public 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).