| Modifier and Type | Field and Description |
|---|---|
| private int[] | |
| private int | |
| private int | |
| private int[] | |
| private int[] | |
| private int | |
| private int | |
| private boolean | |
| private int[] | |
| private static final int | UNEWTRIE2_DATA_0800_OFFSET
The start of data blocks for U+0800 and above. |
| private static final int | UNEWTRIE2_DATA_NULL_OFFSET
The null data block. |
| private static final int | UNEWTRIE2_DATA_START_OFFSET
The start of allocated data blocks. |
| private static final int | UNEWTRIE2_INDEX_2_NULL_OFFSET
The null index-2 block, following the gap in the index-2 table. |
| private static final int | UNEWTRIE2_INDEX_2_START_OFFSET
The start of allocated index-2 blocks. |
| private static final int | |
| private static final int | |
| private boolean | |
| private static final int | UTRIE2_MAX_DATA_LENGTH
Maximum length of the runtime data array. |
| private static final int | UTRIE2_MAX_INDEX_LENGTH
Maximum length of the runtime index array. |
| Access | Constructor and Description |
|---|---|
| public | Trie2Writable(int
the initial value that is set for all code points initialValueP, int the value for out-of-range code points and illegal UTF-8 errorValueP)Create a new, empty, writable Trie2. |
| public | Trie2Writable(Trie2
the source Trie2. Its contents will be copied into the new Trie2. source)Create a new build time (modifiable) Trie2 whose contents are the same as the source Trie2. |
| Modifier and Type | Method and Description |
|---|---|
| private int | |
| private int | |
| private void | |
| private void | |
| private void | |
| private boolean | |
| private void | fillBlock(int block, int start, int limit, int value, int initialValue, boolean overwrite)
initialValue is ignored if overwrite=true |
| private int | |
| private int | |
| private int | |
| private void | |
| public int | Returns: the valuethe code point codePoint)Implements abstract com. |
| private int | |
| private int | |
| public int | Returns: the valuethe code point or lead surrogate value. c)Implements abstract com. |
| private int | |
| private void | |
| private boolean | |
| private boolean | |
| private void | |
| public Trie2Writable | |
| private Trie2Writable | |
| public Trie2Writable | setForLeadSurrogateCodeUnit(char
A UTF-16 code unit. codeUnit, int the value to be stored in the Trie2. value)Set a value for a UTF-16 code unit. |
| private void | |
| public Trie2Writable | setRange(int
the first code point to get the value start, int the last code point to get the value (inclusive) end, int the value value, boolean flag for whether old non-initial values are to be overwritten overwrite)Set a value in a range of code points [start..end]. |
| public Trie2Writable | |
| public Trie2_16 | |
| public Trie2_32 | |
| private void | |
| private void |
| data | back to summary |
|---|---|
| private int[] data | |
| dataCapacity | back to summary |
|---|---|
| private int dataCapacity | |
| firstFreeBlock | back to summary |
|---|---|
| private int firstFreeBlock | |
| index1 | back to summary |
|---|---|
| private int[] index1 | |
| index2 | back to summary |
|---|---|
| private int[] index2 | |
| index2Length | back to summary |
|---|---|
| private int index2Length | |
| index2NullOffset | back to summary |
|---|---|
| private int index2NullOffset | |
| isCompacted | back to summary |
|---|---|
| private boolean isCompacted | |
| map | back to summary |
|---|---|
| private int[] map | |
| UNEWTRIE2_DATA_0800_OFFSET | back to summary |
|---|---|
| private static final int UNEWTRIE2_DATA_0800_OFFSET The start of data blocks for U+0800 and above. Below, compaction uses a block length of 64 for 2-byte UTF-8. From here on, compaction uses UTRIE2_DATA_BLOCK_LENGTH. Data values for 0x780 code points beyond ASCII. | |
| UNEWTRIE2_DATA_NULL_OFFSET | back to summary |
|---|---|
| private static final int UNEWTRIE2_DATA_NULL_OFFSET The null data block. Length 64=0x40 even if UTRIE2_DATA_BLOCK_LENGTH is smaller, to work with 6-bit trail bytes from 2-byte UTF-8. | |
| UNEWTRIE2_DATA_START_OFFSET | back to summary |
|---|---|
| private static final int UNEWTRIE2_DATA_START_OFFSET The start of allocated data blocks. | |
| UNEWTRIE2_INDEX_2_NULL_OFFSET | back to summary |
|---|---|
| private static final int UNEWTRIE2_INDEX_2_NULL_OFFSET The null index-2 block, following the gap in the index-2 table. | |
| UNEWTRIE2_INDEX_2_START_OFFSET | back to summary |
|---|---|
| private static final int UNEWTRIE2_INDEX_2_START_OFFSET The start of allocated index-2 blocks. | |
| UNEWTRIE2_INITIAL_DATA_LENGTH | back to summary |
|---|---|
| private static final int UNEWTRIE2_INITIAL_DATA_LENGTH | |
| UNEWTRIE2_MEDIUM_DATA_LENGTH | back to summary |
|---|---|
| private static final int UNEWTRIE2_MEDIUM_DATA_LENGTH | |
| UTRIE2_DEBUG | back to summary |
|---|---|
| private boolean UTRIE2_DEBUG | |
| UTRIE2_MAX_DATA_LENGTH | back to summary |
|---|---|
| private static final int UTRIE2_MAX_DATA_LENGTH Maximum length of the runtime data array. Limited by 16-bit index values that are left-shifted by UTRIE2_INDEX_SHIFT, and by uint16_t UTrie2Header.shiftedDataLength. | |
| UTRIE2_MAX_INDEX_LENGTH | back to summary |
|---|---|
| private static final int UTRIE2_MAX_INDEX_LENGTH Maximum length of the runtime index array. Limited by its own 16-bit index values, and by uint16_t UTrie2Header.indexLength. (The actual maximum length is lower, (0x110000>>UTRIE2_SHIFT_2)+UTRIE2_UTF8_2B_INDEX_2_LENGTH+UTRIE2_MAX_INDEX_1_LENGTH.) | |
| Trie2Writable | back to summary |
|---|---|
| public Trie2Writable(int initialValueP, int errorValueP) Create a new, empty, writable Trie2. 32-bit data values are used.
| |
| Trie2Writable | back to summary |
|---|---|
| public Trie2Writable(Trie2 source) Create a new build time (modifiable) Trie2 whose contents are the same as the source Trie2.
| |
| allocDataBlock | back to summary |
|---|---|
| private int allocDataBlock(int copyBlock) | |
| allocIndex2Block | back to summary |
|---|---|
| private int allocIndex2Block() | |
| compactData | back to summary |
|---|---|
| private void compactData() | |
| compactIndex2 | back to summary |
|---|---|
| private void compactIndex2() | |
| compactTrie | back to summary |
|---|---|
| private void compactTrie() | |
| equal_int | back to summary |
|---|---|
| private boolean equal_int(int[] a, int s, int t, int length) | |
| fillBlock | back to summary |
|---|---|
| private void fillBlock(int block, int start, int limit, int value, int initialValue, boolean overwrite) initialValue is ignored if overwrite=true
| |
| findHighStart | back to summary |
|---|---|
| private int findHighStart(int highValue) | |
| findSameDataBlock | back to summary |
|---|---|
| private int findSameDataBlock(int dataLength, int otherBlock, int blockLength) | |
| findSameIndex2Block | back to summary |
|---|---|
| private int findSameIndex2Block(int index2Length, int otherBlock) | |
| freeze | back to summary |
|---|---|
| private void freeze(Trie2 dest, Trie2. | |
| get | back to summary |
|---|---|
| public int get(int codePoint) Implements abstract com. Get the value for a code point as stored in the Trie2.
| |
| get | back to summary |
|---|---|
| private int get(int c, boolean fromLSCP) | |
| getDataBlock | back to summary |
|---|---|
| private int getDataBlock(int c, boolean forLSCP) No error checking for illegal arguments.
| |
| getFromU16SingleLead | back to summary |
|---|---|
| public int getFromU16SingleLead(char c) Implements abstract com. Get a trie value for a UTF-16 code unit. This function returns the same value as get() if the input character is outside of the lead surrogate range There are two values stored in a Trie for inputs in the lead surrogate range. This function returns the alternate value, while Trie2.get() returns the main value.
| |
| getIndex2Block | back to summary |
|---|---|
| private int getIndex2Block(int c, boolean forLSCP) | |
| init | back to summary |
|---|---|
| private void init(int initialValueP, int errorValueP) | |
| isInNullBlock | back to summary |
|---|---|
| private boolean isInNullBlock(int c, boolean forLSCP) | |
| isWritableBlock | back to summary |
|---|---|
| private boolean isWritableBlock(int block) | |
| releaseDataBlock | back to summary |
|---|---|
| private void releaseDataBlock(int block) | |
| set | back to summary |
|---|---|
| public Trie2Writable set(int c, int value) Set a value for a code point.
| |
| set | back to summary |
|---|---|
| private Trie2Writable set(int c, boolean forLSCP, int value) | |
| setForLeadSurrogateCodeUnit | back to summary |
|---|---|
| public Trie2Writable setForLeadSurrogateCodeUnit(char codeUnit, int value) Set a value for a UTF-16 code unit. Note that a Trie2 stores separate values for supplementary code points in the lead surrogate range (accessed via the plain set() and get() interfaces) and for lead surrogate code units. The lead surrogate code unit values are set via this function and read by the function getFromU16SingleLead(). For code units outside of the lead surrogate range, this function behaves identically to set().
| |
| setIndex2Entry | back to summary |
|---|---|
| private void setIndex2Entry(int i2, int block) | |
| setRange | back to summary |
|---|---|
| public Trie2Writable setRange(int start, int end, int value, boolean overwrite) Set a value in a range of code points [start..end]. All code points c with start<=c<=end will get the value if overwrite is true or if the old value is the initial value.
| |
| setRange | back to summary |
|---|---|
| public Trie2Writable setRange(Trie2. Set the values from a Trie2.Range. All code points within the range will get the value if overwrite is true or if the old value is the initial value. Ranges with the lead surrogate flag set will set the alternate lead-surrogate values in the Trie, rather than the code point values. This function is intended to work with the ranges produced when iterating the contents of a source Trie. | |
| toTrie2_16 | back to summary |
|---|---|
| public Trie2_16 toTrie2_16() Produce an optimized, read-only Trie2_16 from this writable Trie. The data values outside of the range that will fit in a 16 bit unsigned value will be truncated. | |
| toTrie2_32 | back to summary |
|---|---|
| public Trie2_32 toTrie2_32() Produce an optimized, read-only Trie2_32 from this writable Trie. | |
| uncompact | back to summary |
|---|---|
| private void uncompact() | |
| writeBlock | back to summary |
|---|---|
| private void writeBlock(int block, int value) | |