public final class CharsTrieBuilder extends StringTrieBuilder
This class is not intended for public subclassing.
StringTrieBuilder.Optionstrings| Constructor and Description |
|---|
CharsTrieBuilder()
Constructs an empty builder.
|
| Modifier and Type | Method and Description |
|---|---|
CharsTrieBuilder |
add(CharSequence s,
int value)
Adds a (string, value) pair.
|
CharsTrie |
build(StringTrieBuilder.Option buildOption)
Builds a CharsTrie for the add()ed data.
|
CharSequence |
buildCharSequence(StringTrieBuilder.Option buildOption)
Builds a CharsTrie for the add()ed data and char-serializes it.
|
CharsTrieBuilder |
clear()
Removes all (string, 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 unit)
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.
|
addImpl, buildImpl, clearImplpublic CharsTrieBuilder()
public CharsTrieBuilder add(CharSequence s, int value)
s - The input string.value - The value associated with this char sequence.public CharsTrie build(StringTrieBuilder.Option buildOption)
Multiple calls to build() or buildCharSequence() return tries or sequences which share the builder's char array, without rebuilding. After clear() has been called, a new array will be used.
buildOption - Build option, see StringTrieBuilder.Option.public CharSequence buildCharSequence(StringTrieBuilder.Option buildOption)
Multiple calls to build() or buildCharSequence() return tries or sequences which share the builder's char array, without rebuilding. After clear() has been called, a new array will be used.
buildOption - Build option, see StringTrieBuilder.Option.public CharsTrieBuilder clear()
protected boolean matchNodesCanHaveValues()
matchNodesCanHaveValues in class StringTrieBuilderprotected int getMaxBranchLinearSubNodeLength()
getMaxBranchLinearSubNodeLength in class StringTrieBuilderprotected int getMinLinearMatch()
getMinLinearMatch in class StringTrieBuilderprotected int getMaxLinearMatchLength()
getMaxLinearMatchLength in class StringTrieBuilderprotected int write(int unit)
write in class StringTrieBuilderprotected int write(int offset,
int length)
write in class StringTrieBuilderprotected int writeValueAndFinal(int i,
boolean isFinal)
writeValueAndFinal in class StringTrieBuilderprotected int writeValueAndType(boolean hasValue,
int value,
int node)
writeValueAndType in class StringTrieBuilderprotected int writeDeltaTo(int jumpTarget)
writeDeltaTo in class StringTrieBuilderCopyright (c) 2012 IBM Corporation and others.