public class DTMSafeStringPool extends DTMStringPool
Like DTMStringPool, but threadsafe. It's been proposed that DTMs share their string pool(s); that raises threadsafety issues which this addresses. Of course performance is inferior to that of the bare-bones version.
Status: Passed basic test in main().
NULL
Constructor and Description |
---|
DTMSafeStringPool() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
indexToString(int i) |
static void |
main(java.lang.String[] args)
Command-line unit test driver.
|
void |
removeAllElements() |
int |
stringToIndex(java.lang.String s) |
public void removeAllElements()
removeAllElements
in class DTMStringPool
public java.lang.String indexToString(int i) throws java.lang.ArrayIndexOutOfBoundsException
indexToString
in class DTMStringPool
java.lang.ArrayIndexOutOfBoundsException
- if index doesn't map to a string.public int stringToIndex(java.lang.String s)
stringToIndex
in class DTMStringPool
public static void main(java.lang.String[] args)
Copyright © 2006 Apache XML Project. All Rights Reserved.