public class IntArrayDictionary
extends java.lang.Object
Constructor and Description |
---|
IntArrayDictionary(int capacity)
Constructs a new dictionary.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the dictionary.
|
void |
decrementRefCount(int index)
Removes a element from the dictionary.
|
int[] |
get(int index)
Returns the according entry.
|
int |
probe(int[] key)
Probes the dictionary and either inserts a new entry index or returns the
corresponding entry index.
|
public IntArrayDictionary(int capacity)
capacity
- the capacitypublic void clear()
public void decrementRefCount(int index)
index
- public int[] get(int index)
index
- public int probe(int[] key)
key
- the key