| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public static Trie2_32 | Returns: An unserialized Trie_32, ready for use.a byte buffer to the serialized form of a UTrie2. bytes)
Create a Trie2 from its serialized form.
|
| public final int | Returns: the valuethe code point codePoint)Implements abstract com. |
| public int | Returns: the valuea 16 bit code unit or lead surrogate value. codeUnit)Implements abstract com. |
| public int | |
| pack-priv int | Returns: The last code point with the same value as the starting code point.The code point at which to begin looking. startingCP, int limit, int value)Overrides com. |
| public int | Returns: the number of bytes written.the stream to which the serialized Trie2 data will be written. os)Serialize a Trie2_32 onto an OutputStream. |
| Trie2_32 | back to summary |
|---|---|
| pack-priv Trie2_32() Internal constructor, not for general use. | |
| createFromSerialized | back to summary |
|---|---|
| public static Trie2_32 createFromSerialized(ByteBuffer bytes) throws IOException Hides com. Create a Trie2 from its serialized form. Inverse of utrie2_serialize(). The serialized format is identical between ICU4C and ICU4J, so this function will work with serialized Trie2s from either. The serialized Trie2 in the bytes may be in either little or big endian byte order. This allows using serialized Tries from ICU4C without needing to consider the byte order of the system that created them.
| |
| get | back to summary |
|---|---|
| public final int get(int codePoint) Implements abstract com. Get the value for a code point as stored in the Trie2.
| |
| getFromU16SingleLead | back to summary |
|---|---|
| public int getFromU16SingleLead(char codeUnit) Implements abstract com. Get a Trie2 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 Trie2 for inputs in the lead surrogate range. This function returns the alternate value, while Trie2.get() returns the main value.
| |
| getSerializedLength | back to summary |
|---|---|
public int getSerializedLength()
| |
| rangeEnd | back to summary |
|---|---|
| pack-priv int rangeEnd(int startingCP, int limit, int value) Overrides com. Given a starting code point, find the last in a range of code points, all with the same value. This function is part of the implementation of iterating over the Trie2's contents.
| |
| serialize | back to summary |
|---|---|
| public int serialize(OutputStream os) throws IOException Serialize a Trie2_32 onto an OutputStream. A Trie2 can be serialized multiple times. The serialized data is compatible with ICU4C UTrie2 serialization. Trie2 serialization is unrelated to Java object serialization.
| |