IntIntHashMap
A hash map with int key and int values. There is a restriction: the
value -1 (NOT_FOUND) cannot be stored in the map. 0 can be stored.
An empty record has key=0 and value=0.
A deleted record has key=0 and value=DELETED
| Methods |
| int |
get(int key)
Get the value for the given key.
|
| int |
get(int key)
Get the value for the given key. This method returns NOT_FOUND if the
entry has not been found.
Parameters:
key - the key
Returns:
the value or NOT_FOUND
|
| void |
put(int key, int value)
Store the given key-value pair.
|
| void |
put(int key, int value)
Store the given key-value pair. The value is overwritten or added.
Parameters:
key - the key
value - the value (-1 is not supported)
|
| void |
rehash(int newLevel)
|
| void |
rehash(int newLevel)
|
| void |
remove(int key)
Remove the key-value pair with the given key.
|
| void |
remove(int key)
Remove the key-value pair with the given key.
Parameters:
key - the key
|
| void |
reset(int newLevel)
|
| void |
reset(int newLevel)
|
NOT_FOUND
= -1
The value indicating that the entry has not been found.