Package org.apache.uima.internal.util
Class Int2IntArrayMapFixedSize
java.lang.Object
org.apache.uima.internal.util.Int2IntArrayMapFixedSize
A map<int, int>
based on having a key and value int array, where the keys are sorted
Supports sharing a single key array with multiple value arrays
Implements Map - like interface: keys and values are ints
values can be anything except 0; 0 is the value returned by get if not found
All adds must occur before any gets; then a sort must be called unless the adds are in sort order
Threading: instances of this class may be accessed on multiple threads (different iterators may
be on different threads)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
get
(int key, int[] sortedKeys) int
getAtIndex
(int index) void
putAtIndex
(int index, int value)
-
Constructor Details
-
Int2IntArrayMapFixedSize
public Int2IntArrayMapFixedSize(int length)
-
-
Method Details
-
get
public int get(int key, int[] sortedKeys) -
getAtIndex
public int getAtIndex(int index) -
putAtIndex
public void putAtIndex(int index, int value)
-