Package org.apache.uima.cas.impl
Class StringSet
- java.lang.Object
-
- org.apache.uima.cas.impl.StringSet
-
final class StringSet extends java.lang.ObjectLike string heap, but keeps strings in a hashmap (for quick testing) and an array list. This is used to emulate how v2 keeps strings, to support backwards compatibility for low-level access
-
-
Field Summary
Fields Modifier and Type Field Description private intlastStringCodeprivate java.util.HashMap<java.lang.String,java.lang.Integer>string2intprivate java.util.ArrayList<java.lang.String>strings
-
Constructor Summary
Constructors Constructor Description StringSet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) intgetCodeForString(java.lang.String s)get the code for a string, adding it to the string table if not already there.(package private) intgetSize()(package private) java.lang.StringgetStringForCode(int stringCode)(package private) voidreset()
-
-
-
Method Detail
-
reset
void reset()
-
getStringForCode
java.lang.String getStringForCode(int stringCode)
-
getCodeForString
int getCodeForString(java.lang.String s)
get the code for a string, adding it to the string table if not already there.- Parameters:
s- The string.- Returns:
- The code corresponding to the string, which can be used in the getStringForCode call above
-
getSize
int getSize()
-
-