This class is not intended for public subclassing.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private int | |
| private final byte[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public BytesTrieBuilder | Returns: thisThe array that contains the byte sequence, starting at index 0. sequence, int The length of the byte sequence. length, int The value associated with this byte sequence. value)Adds a (byte sequence, value) pair. |
| public BytesTrie | Returns: A new BytesTrie for the add()ed data.Build option, see StringTrieBuilder.Option. buildOptionBuilds a BytesTrie for the add()ed data. |
| public ByteBuffer | Returns: A ByteBuffer with the byte-serialized BytesTrie for the add()ed data. The buffer is not read-only and array() can be called.Build option, see StringTrieBuilder.Option. buildOptionBuilds a BytesTrie for the add()ed data and byte-serializes it. |
| private void | |
| public BytesTrieBuilder | |
| private void | |
| protected int | getMaxBranchLinearSubNodeLength()
Implements abstract com.
Deprecated
This API is ICU internal only.
|
| protected int | getMaxLinearMatchLength()
Implements abstract com.
Deprecated
This API is ICU internal only.
|
| protected int | getMinLinearMatch()
Implements abstract com.
Deprecated
This API is ICU internal only.
|
| public static final int | |
| protected boolean | matchNodesCanHaveValues()
Implements abstract com.
Deprecated
This API is ICU internal only.
|
| protected int | write(int b)
Implements abstract com.
Deprecated
This API is ICU internal only.
|
| protected int | write(int offset, int length)
Implements abstract com.
Deprecated
This API is ICU internal only.
|
| private int | |
| protected int | writeDeltaTo(int jumpTarget)
Implements abstract com.
Deprecated
This API is ICU internal only.
|
| protected int | writeValueAndFinal(int i, boolean isFinal)
Implements abstract com.
Deprecated
This API is ICU internal only.
|
| protected int | writeValueAndType(boolean hasValue, int value, int node)
Implements abstract com.
Deprecated
This API is ICU internal only.
|
| bytes | back to summary |
|---|---|
| private byte[] bytes | |
| bytesLength | back to summary |
|---|---|
| private int bytesLength | |
| intBytes | back to summary |
|---|---|
| private final byte[] intBytes | |
| BytesTrieBuilder | back to summary |
|---|---|
| public BytesTrieBuilder() Constructs an empty builder.
| |
| add | back to summary |
|---|---|
| public BytesTrieBuilder add(byte[] sequence, int length, int value) Adds a (byte sequence, value) pair. The byte sequence must be unique. Bytes 0..length-1 will be copied; the builder does not keep a reference to the input array.
| |
| build | back to summary |
|---|---|
| public BytesTrie build(StringTrieBuilder. Builds a BytesTrie for the add()ed data. Once built, no further data can be add()ed until clear() is called. A BytesTrie cannot be empty. At least one (byte sequence, value) pair must have been add()ed. Multiple calls to build() or buildByteBuffer() return tries or buffers which share the builder's byte array, without rebuilding. The byte array must not be modified via the buildByteBuffer() result object. After clear() has been called, a new array will be used.
| |
| buildByteBuffer | back to summary |
|---|---|
| public ByteBuffer buildByteBuffer(StringTrieBuilder. Builds a BytesTrie for the add()ed data and byte-serializes it. Once built, no further data can be add()ed until clear() is called. A BytesTrie cannot be empty. At least one (byte sequence, value) pair must have been add()ed. Multiple calls to build() or buildByteBuffer() return tries or buffers which share the builder's byte array, without rebuilding. Do not modify the bytes in the buffer! After clear() has been called, a new array will be used. The serialized BytesTrie is accessible via the buffer's array()/arrayOffset()+position() or remaining()/get(byte[]) etc.
| |
| buildBytes | back to summary |
|---|---|
| private void buildBytes(StringTrieBuilder. | |
| clear | back to summary |
|---|---|
| public BytesTrieBuilder clear() Removes all (byte sequence, value) pairs. New data can then be add()ed and a new trie can be built.
| |
| ensureCapacity | back to summary |
|---|---|
| private void ensureCapacity(int length) | |
| getMaxBranchLinearSubNodeLength | back to summary |
|---|---|
| protected int getMaxBranchLinearSubNodeLength() Implements abstract com. Deprecated This API is ICU internal only.
| |
| getMaxLinearMatchLength | back to summary |
|---|---|
| protected int getMaxLinearMatchLength() Implements abstract com. Deprecated This API is ICU internal only.
| |
| getMinLinearMatch | back to summary |
|---|---|
| protected int getMinLinearMatch() Implements abstract com. Deprecated This API is ICU internal only.
| |
| internalEncodeDelta | back to summary |
|---|---|
| public static final int internalEncodeDelta(int i, byte[] intBytes)
Deprecated This API is ICU internal only.
| |
| matchNodesCanHaveValues | back to summary |
|---|---|
| protected boolean matchNodesCanHaveValues() Implements abstract com. Deprecated This API is ICU internal only.
| |
| write | back to summary |
|---|---|
| protected int write(int b) Implements abstract com. Deprecated This API is ICU internal only.
| |
| write | back to summary |
|---|---|
| protected int write(int offset, int length) Implements abstract com. Deprecated This API is ICU internal only.
| |
| write | back to summary |
|---|---|
| private int write(byte[] b, int length) | |
| writeDeltaTo | back to summary |
|---|---|
| protected int writeDeltaTo(int jumpTarget) Implements abstract com. Deprecated This API is ICU internal only.
| |
| writeValueAndFinal | back to summary |
|---|---|
| protected int writeValueAndFinal(int i, boolean isFinal) Implements abstract com. Deprecated This API is ICU internal only.
| |
| writeValueAndType | back to summary |
|---|---|
| protected int writeValueAndType(boolean hasValue, int value, int node) Implements abstract com. Deprecated This API is ICU internal only.
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public char | charAt(int
the index of the i)char value to be returnedImplements java. char value at the specified index.
|
| public int | |
| public CharSequence | subSequence(int
the start index, inclusive start, int the end index, exclusive end)Implements java. CharSequence that is a subsequence of this sequence.
|
| BytesAsCharSequence | back to summary |
|---|---|
| public BytesAsCharSequence(byte[] sequence, int length) | |
| charAt | back to summary |
|---|---|
| public char charAt(int i) Implements java. Doc from java. Returns the If the
| |
| length | back to summary |
|---|---|
| public int length() Implements java. Doc from java. Returns the length of this character sequence. The length is the number
of 16-bit
| |
| subSequence | back to summary |
|---|---|
| public CharSequence subSequence(int start, int end) Implements java. Doc from java. Returns a
| |