Package org.apache.uima.internal.util
Class CharArraySpanMap
java.lang.Object
org.apache.uima.internal.util.CharArraySpanMap
A map from subsequences of a character array to objects.
-
Constructor Summary
ConstructorDescriptionDefault constructor.CharArraySpanMap
(int initialArraySize) Constructor with initial array size argument.CharArraySpanMap
(int initialArraySize, int initialMapSize) Constructor. -
Method Summary
-
Constructor Details
-
CharArraySpanMap
public CharArraySpanMap()Default constructor. -
CharArraySpanMap
public CharArraySpanMap(int initialArraySize) Constructor with initial array size argument.- Parameters:
initialArraySize
- Initial array size.
-
CharArraySpanMap
public CharArraySpanMap(int initialArraySize, int initialMapSize) Constructor.- Parameters:
initialArraySize
- Initial array size.initialMapSize
- Initial map size.
-
-
Method Details
-
put
Add a key-value pair to the map.- Parameters:
s
- The key (will be copied).value
- The value.
-
containsKey
public final boolean containsKey(char[] characterArray, int start, int length) Check if sub-range of character array is a key.- Parameters:
characterArray
- Array that contains the potential key chars.start
- Start of sub-range.length
- Length of sub-range.- Returns:
true
iff the map contains the key.
-
get
-