public final class StringTable
extends java.lang.Object
implements java.util.function.Function<java.lang.CharSequence,java.lang.String>
The implementation uses an FNV-1a hash, and collisions simply overwrite the previously cached value.
| Constructor and Description |
|---|
StringTable()
Create a string table with 2048 entries.
|
StringTable(int sizeBits)
Create a string table with a specific number of entries.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
apply(java.lang.CharSequence chars) |
public StringTable()
public StringTable(int sizeBits)
sizeBits - Size of the table based on bit shifting (e.g., 1 -> 2, 2 -> 4, ..., 10 -> 1024, 11 -> 2048).