| Modifier and Type | Field and Description |
|---|---|
| protected int[] | |
| protected int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | IntTrieBuilder(int[]
data to be filled into table aliasdata, int maximum data length allowed in table maxdatalength, int initial data value initialvalue, int leadunitvalue, boolean is latin 1 to be linear latin1linear)Constructs a build table |
| Modifier and Type | Method and Description |
|---|---|
| private int | |
| private void | |
| private void | |
| private static final int | findSameDataBlock(int[]
array data, int dataLength, int otherBlock, int step)Find the same data block |
| private final void | fold(TrieBuilder.
fold implementation manipulateFold the normalization data for supplementary code points into a compact area on top of the BMP-part of the trie index, with the lead surrogates indexing this compact area. |
| private int | Returns: -1 if no new data block available (out of memory in data array)codepoint to look for ch)No error checking for illegal arguments. |
| public int | Returns: the 32 bit datacodepoint which data is to be retrieved ch)Gets a 32 bit data from the table data |
| public int | Returns: the 32 bit data value.code point for which data is to be retrieved. ch, boolean[] Output parameter, inBlockZero[0] returns true if the
char maps into block zero, otherwise false. inBlockZero)Get a 32 bit data from the table data |
| public IntTrie | Returns: a new triebuilder raw fold method implementation datamanipulate,result trie fold method triedatamanipulateSerializes the build table with 32 bit data |
| public int | Returns: the number of bytes written to the output stream.the output stream to which the seriaized trie will be written.
If nul, the function still returns the size of the serialized Trie. os, boolean If true, reduce the data size to 16 bits. The resulting
serialized form can then be used to create a CharTrie. reduceTo16Bits, TrieBuilder.builder raw fold method implementation datamanipulateSerializes the build table to an output stream. |
| public boolean | Returns: false if a failure occurred (illegal argument or data array overrun)the first code point to get the value start, int one past the last code point to get the value limit, 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..limit]. |
| public boolean | Returns: true if the set is successful, otherwise if the table has been compacted return falsecodepoint which data is to be set ch, int to set value)Sets a 32 bit data in the table data |
| m_data_ | back to summary |
|---|---|
| protected int[] m_data_ | |
| m_initialValue_ | back to summary |
|---|---|
| protected int m_initialValue_ | |
| m_leadUnitValue_ | back to summary |
|---|---|
| private int m_leadUnitValue_ | |
| IntTrieBuilder | back to summary |
|---|---|
| public IntTrieBuilder(IntTrieBuilder table) Copy constructor | |
| IntTrieBuilder | back to summary |
|---|---|
| public IntTrieBuilder(int[] aliasdata, int maxdatalength, int initialvalue, int leadunitvalue, boolean latin1linear) Constructs a build table
| |
| allocDataBlock | back to summary |
|---|---|
| private int allocDataBlock() | |
| compact | back to summary |
|---|---|
| private void compact(boolean overlap) Compact a folded build-time trie. The compaction - removes blocks that are identical with earlier ones - overlaps adjacent blocks as much as possible (if overlap == true) - moves blocks in steps of the data granularity - moves and overlaps blocks that overlap with multiple values in the overlap region It does not - try to move and overlap blocks that are not already adjacent
| |
| fillBlock | back to summary |
|---|---|
private void fillBlock(int block, int start, int limit, int value, boolean overwrite)
| |
| findSameDataBlock | back to summary |
|---|---|
| private static final int findSameDataBlock(int[] data, int dataLength, int otherBlock, int step) Find the same data block
| |
| fold | back to summary |
|---|---|
| private final void fold(TrieBuilder. Fold the normalization data for supplementary code points into a compact area on top of the BMP-part of the trie index, with the lead surrogates indexing this compact area. Duplicate the index values for lead surrogates: From inside the BMP area, where some may be overridden with folded values, to just after the BMP area, where they can be retrieved for code point lookups.
| |
| getDataBlock | back to summary |
|---|---|
| private int getDataBlock(int ch) No error checking for illegal arguments.
| |
| getValue | back to summary |
|---|---|
| public int getValue(int ch) Gets a 32 bit data from the table data
| |
| getValue | back to summary |
|---|---|
| public int getValue(int ch, boolean[] inBlockZero) Get a 32 bit data from the table data
| |
| serialize | back to summary |
|---|---|
| public IntTrie serialize(TrieBuilder. Serializes the build table with 32 bit data
| |
| serialize | back to summary |
|---|---|
| public int serialize(OutputStream os, boolean reduceTo16Bits, TrieBuilder. Serializes the build table to an output stream. Compacts the build-time trie after all values are set, and then writes the serialized form onto an output stream. After this, this build-time Trie can only be serialized again and/or closed; no further values can be added. This function is the rough equivalent of utrie_seriaize() in ICU4C.
| |
| setRange | back to summary |
|---|---|
| public boolean setRange(int start, int limit, int value, boolean overwrite) Set a value in a range of code points [start..limit]. All code points c with start <= c < limit will get the value if overwrite is true or if the old value is 0.
| |
| setValue | back to summary |
|---|---|
| public boolean setValue(int ch, int value) Sets a 32 bit data in the table data
| |