Package org.apache.uima.internal.util
Class Int2IntHashMap
- java.lang.Object
-
- org.apache.uima.internal.util.Int2IntHashMap
-
public class Int2IntHashMap extends Object
A map<int, int> based on JCasHashMap, but without the multi-threading support This impl is for use in a single thread case only Supports shrinking (reallocating the big table) Implements Map - like interface: keys and values are ints Entry set not (yet) impl keys must be non-0; 0 is reserved to be an empty slot values can be anything, but 0 is the value returned by get if not found so values probably should not be 0
-
-
Constructor Summary
Constructors Constructor Description Int2IntHashMap()
Int2IntHashMap(int initialCapacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
containsKey(int key)
int
get(int key)
int[]
getSortedKeys()
boolean
isKeyValid(int position)
IntListIterator
keyIterator()
IntListIterator
keyIterator(int aKey)
IntKeyValueIterator
keyValueIterator()
IntKeyValueIterator
keyValueIterator(int aKey)
int
put(int key, int value)
void
putInner(int key, int value)
void
showHistogram()
int
size()
-
-
-
Method Detail
-
clear
public void clear()
-
get
public int get(int key)
-
containsKey
public boolean containsKey(int key)
-
isKeyValid
public boolean isKeyValid(int position)
-
put
public int put(int key, int value)
-
putInner
public void putInner(int key, int value)
-
size
public int size()
-
getSortedKeys
public int[] getSortedKeys()
-
keyIterator
public IntListIterator keyIterator()
-
keyIterator
public IntListIterator keyIterator(int aKey)
-
keyValueIterator
public IntKeyValueIterator keyValueIterator()
-
keyValueIterator
public IntKeyValueIterator keyValueIterator(int aKey)
-
showHistogram
public void showHistogram()
-
-