java.lang.Object
com.ibm.dtfj.corereaders.zos.util.AbstractHashMap
com.ibm.dtfj.corereaders.zos.util.IntegerMap
- All Implemented Interfaces:
Serializable
This is a simple class to map one integer to another but without the overhead of using
a Hashtable. There is one limitation at present which is that the value of -1 can't be
used since this is currently used to indicate value not found.
- See Also:
-
Constructor Summary
-
Method Summary
Methods declared in class com.ibm.dtfj.corereaders.zos.util.AbstractHashMap
getKeys, getKeysArray
-
Constructor Details
-
IntegerMap
public IntegerMap()
-
-
Method Details
-
get
public long get(long key) Returns the value mapped by the given key.- Returns:
- the value or -1 if it cannot be found
-
put
public void put(long key, long value) Add the key/value pair to the map. The value must not be -1. -
remove
public long remove(long key) Remove the key from the map and return the old value. -
memoryUsage
public int memoryUsage() -
main
Run some basic tests on this class.
-