Package org.apache.uima.cas.impl
Class StringSet
java.lang.Object
org.apache.uima.cas.impl.StringSet
Like 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
FieldsModifier and TypeFieldDescriptionprivate int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) int
get the code for a string, adding it to the string table if not already there.(package private) int
getSize()
(package private) String
getStringForCode
(int stringCode) (package private) void
reset()
-
Field Details
-
lastStringCode
private int lastStringCode -
strings
-
string2int
-
-
Constructor Details
-
StringSet
StringSet()
-
-
Method Details
-
reset
void reset() -
getStringForCode
-
getCodeForString
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()
-