public class TrieBuilder extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
TrieBuilder.DataManipulate
Character data in com.ibm.impl.Trie have different user-specified format
for different purposes.
|
| Modifier and Type | Field and Description |
|---|---|
protected static int |
BMP_INDEX_LENGTH_
Length of the BMP portion of the index (stage 1) array.
|
static int |
DATA_BLOCK_LENGTH
Number of data values in a stage 2 (data array) block.
|
protected static int |
DATA_GRANULARITY_
The alignment size of a stage 2 data block.
|
protected static int |
INDEX_SHIFT_
Shift size for shifting left the index array values.
|
protected int |
m_dataCapacity_ |
protected int |
m_dataLength_ |
protected int[] |
m_index_
Index values at build-time are 32 bits wide for easier processing.
|
protected int |
m_indexLength_ |
protected boolean |
m_isCompacted_ |
protected boolean |
m_isLatin1Linear_ |
protected int[] |
m_map_
Map of adjusted indexes, used in utrie_compact().
|
protected static int |
MASK_
Mask for getting the lower bits from the input index.
|
protected static int |
MAX_DATA_LENGTH_
Maximum length of the runtime data (stage 2) array.
|
protected static int |
MAX_INDEX_LENGTH_
Length of the index (stage 1) array before folding.
|
protected static int |
OPTIONS_DATA_IS_32_BIT_
If set, then the data (stage 2) array is 32 bits wide.
|
protected static int |
OPTIONS_INDEX_SHIFT_
Shifting to position the index value in options
|
protected static int |
OPTIONS_LATIN1_IS_LINEAR_
If set, then Latin-1 data (for U+0000..U+00ff) is stored in the data
(stage 2) array as a simple, linear array at data + DATA_BLOCK_LENGTH.
|
protected static int |
SHIFT_
Shift size for shifting right the input index.
|
protected static int |
SURROGATE_BLOCK_COUNT_
Number of index (stage 1) entries per lead surrogate.
|
| Modifier | Constructor and Description |
|---|---|
protected |
TrieBuilder() |
protected |
TrieBuilder(TrieBuilder table) |
| Modifier and Type | Method and Description |
|---|---|
protected static boolean |
equal_int(int[] array,
int start1,
int start2,
int length)
Compare two sections of an array for equality.
|
protected static int |
findSameIndexBlock(int[] index,
int indexLength,
int otherBlock)
Finds the same index block as the otherBlock
|
protected void |
findUnusedBlocks()
Set a value in the trie index map to indicate which data block
is referenced and which one is not.
|
boolean |
isInZeroBlock(int ch)
Checks if the character belongs to a zero block in the trie
|
public static final int DATA_BLOCK_LENGTH
protected int[] m_index_
protected int m_indexLength_
protected int m_dataCapacity_
protected int m_dataLength_
protected boolean m_isLatin1Linear_
protected boolean m_isCompacted_
protected int[] m_map_
protected static final int SHIFT_
protected static final int MAX_INDEX_LENGTH_
protected static final int BMP_INDEX_LENGTH_
protected static final int SURROGATE_BLOCK_COUNT_
protected static final int MASK_
protected static final int INDEX_SHIFT_
protected static final int MAX_DATA_LENGTH_
protected static final int OPTIONS_INDEX_SHIFT_
protected static final int OPTIONS_DATA_IS_32_BIT_
protected static final int OPTIONS_LATIN1_IS_LINEAR_
protected static final int DATA_GRANULARITY_
protected TrieBuilder()
protected TrieBuilder(TrieBuilder table)
public boolean isInZeroBlock(int ch)
ch - codepoint which data is to be retrievedprotected static final boolean equal_int(int[] array,
int start1,
int start2,
int length)
protected void findUnusedBlocks()
protected static final int findSameIndexBlock(int[] index,
int indexLength,
int otherBlock)
index - arrayindexLength - size of indexotherBlock -