| Modifier and Type | Class and Description |
|---|---|
| public class | Trie2.CharSequenceIterator
An iterator that operates over an input CharSequence, and for each Unicode code point in the input returns the associated value from the Trie2. |
| public static class | Trie2.CharSequenceValues
Struct-like class for holding the results returned by a UTrie2 CharSequence iterator. |
| public static class | Trie2.Range
When iterating over the contents of a Trie2, Elements of this type are produced. |
| pack-priv class | Trie2.Trie2Iterator
Implementation class for an iterator over a Trie2. |
| pack-priv static class | Trie2.UTrie2Header
Trie2 data structure in serialized form: UTrie2Header header; uint16_t index[header.index2Length]; uint16_t data[header.shiftedDataLength<<2]; -- or uint32_t data[...] For Java, this is read from the stream into an instance of UTrie2Header. |
| public static interface | Trie2.ValueMapper
When iterating over the contents of a Trie2, an instance of TrieValueMapper may be used to remap the values from the Trie2. |
| pack-priv static enum | Trie2.ValueWidth
Selectors for the width of a UTrie2 data value. |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | |
| pack-priv int[] | |
| pack-priv int | |
| pack-priv int | |
| private static Trie2. | |
| pack-priv int | errorValue
Value returned for out-of-range code points and illegal UTF-8. |
| pack-priv int | |
| pack-priv Trie2. | |
| pack-priv int | |
| pack-priv int | |
| pack-priv char[] | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | UNEWTRIE2_MAX_DATA_LENGTH
Maximum length of the build-time data array. |
| pack-priv static final int | UNEWTRIE2_MAX_INDEX_2_LENGTH
Maximum length of the build-time index-2 array. |
| pack-priv static final int | UTRIE2_BAD_UTF8_DATA_OFFSET
The illegal-UTF-8 data block follows the ASCII block, at offset 128=0x80. |
| pack-priv static final int | UTRIE2_CP_PER_INDEX_1_ENTRY
Number of code points per index-1 table entry. |
| pack-priv static final int | UTRIE2_DATA_BLOCK_LENGTH
Number of entries in a data block. |
| pack-priv static final int | UTRIE2_DATA_GRANULARITY
The alignment size of a data block. |
| pack-priv static final int | UTRIE2_DATA_MASK
Mask for getting the lower bits for the in-data-block offset. |
| pack-priv static final int | UTRIE2_DATA_START_OFFSET
The start of non-linear-ASCII data blocks, at offset 192=0xc0. |
| pack-priv static final int | UTRIE2_INDEX_1_OFFSET
The index-1 table, only used for supplementary code points, at offset 2112=0x840. |
| pack-priv static final int | UTRIE2_INDEX_2_BLOCK_LENGTH
Number of entries in an index-2 block. |
| pack-priv static final int | UTRIE2_INDEX_2_BMP_LENGTH
Count the lengths of both BMP pieces. |
| pack-priv static final int | UTRIE2_INDEX_2_MASK
Mask for getting the lower bits for the in-index-2-block offset. |
| pack-priv static final int | UTRIE2_INDEX_2_OFFSET
The BMP part of the index-2 table is fixed and linear and starts at offset 0. |
| pack-priv static final int | UTRIE2_INDEX_SHIFT
Shift size for shifting left the index array values. |
| pack-priv static final int | |
| pack-priv static final int | UTRIE2_LSCP_INDEX_2_OFFSET
The part of the index-2 table for U+D800..U+DBFF stores values for lead surrogate code _units_ not code _points_. |
| pack-priv static final int | |
| pack-priv static final int | UTRIE2_OMITTED_BMP_INDEX_1_LENGTH
Number of index-1 entries for the BMP. |
| pack-priv static final int | UTRIE2_OPTIONS_VALUE_BITS_MASK
Trie2 constants, defining shift widths, index array lengths, etc. These are needed for the runtime macros but users can treat these as implementation details and skip to the actual public API further below. |
| pack-priv static final int | UTRIE2_SHIFT_1
Shift size for getting the index-1 table offset. |
| pack-priv static final int | UTRIE2_SHIFT_1_2
Difference between the two shift sizes, for getting an index-1 offset from an index-2 offset. |
| pack-priv static final int | UTRIE2_SHIFT_2
Shift size for getting the index-2 table offset. |
| pack-priv static final int | |
| pack-priv static final int | UTRIE2_UTF8_2B_INDEX_2_OFFSET
The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Trie2. | Returns: the CharSequenceIteratorA text string to be iterated over. text, int The starting iteration position within the input text. index)Create an iterator that will produce the values from the Trie2 for the sequence of code points in an input text. |
| public static Trie2 | Returns: An unserialized Trie2, ready for use.a byte buffer to the serialized form of a UTrie2. bytes)Create a Trie2 from its serialized form. |
| public final boolean | equals(Object
the reference object with which to compare. other)Overrides java. |
| public abstract int | Returns: the valuethe code point codePoint)Get the value for a code point as stored in the Trie2. |
| public abstract int | Returns: the valuethe code point or lead surrogate value. c)Get the trie value for a UTF-16 code unit. |
| public static int | Returns: the Trie version of the serialized form, or 0 if it is not recognized as a serialized UTriean InputStream containing the serialized form
of a UTrie, version 1 or 2. The stream must support mark() and reset().
The position of the input stream will be left unchanged. is, boolean If false, only big-endian (Java native) serialized forms are recognized.
If true, little-endian serialized forms are recognized as well. littleEndianOk)Get the UTrie version from an InputStream containing the serialized form of either a Trie (version 1) or a Trie2 (version 2). |
| private static int | |
| public int | |
| private static int | |
| private static int | |
| private static int | |
| public Iterator | Returns: an IteratorImplements java. |
| public Iterator | Returns: an Iteratorprovides a function to remap values obtained from the Trie2. mapperCreate an iterator over the value ranges from this Trie2. |
| public Iterator | iteratorForLeadSurrogate(char lead, Trie2.
Create an iterator over the Trie2 values for the 1024=0x400 code points corresponding to a given lead surrogate. |
| public Iterator | iteratorForLeadSurrogate(char lead)
Create an iterator over the Trie2 values for the 1024=0x400 code points corresponding to a given lead surrogate. |
| pack-priv int | Returns: The last contiguous character with the same value.The character to begin with. start, int limitp, int val)Find the last character in a contiguous range of characters with the same Trie2 value as the input character. |
| protected int | Returns: the number of bytes written.the stream to which the serialized Trie2 data will be written. dos)Serialize a trie2 Header and Index onto an OutputStream. |