public class SimpleStringInterner extends StringInterner
| Constructor and Description |
|---|
SimpleStringInterner(int tableSize,
int maxChainLength) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
intern(java.lang.String s)
Returns a single object instance for each equal string.
|
internpublic SimpleStringInterner(int tableSize,
int maxChainLength)
tableSize - Size of the hash table, should be a power of two.maxChainLength - Maximum length of each bucket, after which the oldest item inserted is dropped.public java.lang.String intern(java.lang.String s)
StringInternerintern in class StringInternerCopyright © 2000-2022 Apache Software Foundation. All Rights Reserved.