public class Trie2Writable extends Trie2
Trie2.CharSequenceIterator, Trie2.CharSequenceValues, Trie2.Range, Trie2.ValueMapper| Constructor and Description |
|---|
Trie2Writable(int initialValueP,
int errorValueP)
Create a new, empty, writable Trie2.
|
Trie2Writable(Trie2 source)
Create a new build time (modifiable) Trie2 whose contents are the same as the source Trie2.
|
| Modifier and Type | Method and Description |
|---|---|
int |
get(int codePoint)
Get the value for a code point as stored in the Trie2.
|
int |
getFromU16SingleLead(char c)
Get a trie value for a UTF-16 code unit.
|
Trie2Writable |
set(int c,
int value)
Set a value for a code point.
|
Trie2Writable |
setForLeadSurrogateCodeUnit(char codeUnit,
int value)
Set a value for a UTF-16 code unit.
|
Trie2Writable |
setRange(int start,
int end,
int value,
boolean overwrite)
Set a value in a range of code points [start..end].
|
Trie2Writable |
setRange(Trie2.Range range,
boolean overwrite)
Set the values from a Trie2.Range.
|
Trie2_16 |
toTrie2_16()
Produce an optimized, read-only Trie2_16 from this writable Trie.
|
Trie2_32 |
toTrie2_32()
Produce an optimized, read-only Trie2_32 from this writable Trie.
|
charSequenceIterator, createFromSerialized, equals, getVersion, hashCode, iterator, iterator, iteratorForLeadSurrogate, iteratorForLeadSurrogate, serializeHeaderclone, getClass, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic Trie2Writable(int initialValueP,
int errorValueP)
initialValueP - the initial value that is set for all code pointserrorValueP - the value for out-of-range code points and illegal UTF-8public Trie2Writable(Trie2 source)
source - the source Trie2. Its contents will be copied into the new Trie2.public Trie2Writable set(int c, int value)
c - the code pointvalue - the valuepublic Trie2Writable setRange(int start, int end, int value, boolean overwrite)
start - the first code point to get the valueend - the last code point to get the value (inclusive)value - the valueoverwrite - flag for whether old non-initial values are to be overwrittenpublic Trie2Writable setRange(Trie2.Range range, boolean overwrite)
range - contains the range of code points and the value to be set.overwrite - flag for whether old non-initial values are to be overwrittenpublic Trie2Writable setForLeadSurrogateCodeUnit(char codeUnit, int value)
codeUnit - A UTF-16 code unit.value - the value to be stored in the Trie2.public int get(int codePoint)
public int getFromU16SingleLead(char c)
getFromU16SingleLead in class Trie2c - the code point or lead surrogate value.public Trie2_16 toTrie2_16()
public Trie2_32 toTrie2_32()