|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.icu.util.StringTrieBuilder com.ibm.icu.util.BytesTrieBuilder
public final class BytesTrieBuilder
Builder class for BytesTrie.
This class is not intended for public subclassing.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.ibm.icu.util.StringTrieBuilder |
---|
StringTrieBuilder.Option |
Field Summary |
---|
Fields inherited from class com.ibm.icu.util.StringTrieBuilder |
---|
strings |
Constructor Summary | |
---|---|
BytesTrieBuilder()
Constructs an empty builder. |
Method Summary | |
---|---|
BytesTrieBuilder |
add(byte[] sequence,
int length,
int value)
Adds a (byte sequence, value) pair. |
BytesTrie |
build(StringTrieBuilder.Option buildOption)
Builds a BytesTrie for the add()ed data. |
ByteBuffer |
buildByteBuffer(StringTrieBuilder.Option buildOption)
Builds a BytesTrie for the add()ed data and byte-serializes it. |
BytesTrieBuilder |
clear()
Removes all (byte sequence, value) pairs. |
protected int |
getMaxBranchLinearSubNodeLength()
Deprecated. This API is ICU internal only. |
protected int |
getMaxLinearMatchLength()
Deprecated. This API is ICU internal only. |
protected int |
getMinLinearMatch()
Deprecated. This API is ICU internal only. |
protected boolean |
matchNodesCanHaveValues()
Deprecated. This API is ICU internal only. |
protected int |
write(int b)
Deprecated. This API is ICU internal only. |
protected int |
write(int offset,
int length)
Deprecated. This API is ICU internal only. |
protected int |
writeDeltaTo(int jumpTarget)
Deprecated. This API is ICU internal only. |
protected int |
writeValueAndFinal(int i,
boolean isFinal)
Deprecated. This API is ICU internal only. |
protected int |
writeValueAndType(boolean hasValue,
int value,
int node)
Deprecated. This API is ICU internal only. |
Methods inherited from class com.ibm.icu.util.StringTrieBuilder |
---|
addImpl, buildImpl, clearImpl |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BytesTrieBuilder()
Method Detail |
---|
public BytesTrieBuilder add(byte[] sequence, int length, int value)
sequence
- The array that contains the byte sequence, starting at index 0.length
- The length of the byte sequence.value
- The value associated with this byte sequence.
public BytesTrie build(StringTrieBuilder.Option buildOption)
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.
buildOption
- Build option, see StringTrieBuilder.Option.
public ByteBuffer buildByteBuffer(StringTrieBuilder.Option buildOption)
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.
buildOption
- Build option, see StringTrieBuilder.Option.
public BytesTrieBuilder clear()
protected boolean matchNodesCanHaveValues()
matchNodesCanHaveValues
in class StringTrieBuilder
protected int getMaxBranchLinearSubNodeLength()
getMaxBranchLinearSubNodeLength
in class StringTrieBuilder
protected int getMinLinearMatch()
getMinLinearMatch
in class StringTrieBuilder
protected int getMaxLinearMatchLength()
getMaxLinearMatchLength
in class StringTrieBuilder
protected int write(int b)
write
in class StringTrieBuilder
protected int write(int offset, int length)
write
in class StringTrieBuilder
protected int writeValueAndFinal(int i, boolean isFinal)
writeValueAndFinal
in class StringTrieBuilder
protected int writeValueAndType(boolean hasValue, int value, int node)
writeValueAndType
in class StringTrieBuilder
protected int writeDeltaTo(int jumpTarget)
writeDeltaTo
in class StringTrieBuilder
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |