public final class CharsTrieBuilder extends StringTrieBuilder
This class is not intended for public subclassing.
StringTrieBuilder.Option
strings
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, clearImpl
public 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)
A CharsTrie cannot be empty. At least one (string, value) pair must have been add()ed.
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)
A CharsTrie cannot be empty. At least one (string, value) pair must have been add()ed.
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()
@Deprecated protected boolean matchNodesCanHaveValues()
matchNodesCanHaveValues
in class StringTrieBuilder
@Deprecated protected int getMaxBranchLinearSubNodeLength()
getMaxBranchLinearSubNodeLength
in class StringTrieBuilder
@Deprecated protected int getMinLinearMatch()
getMinLinearMatch
in class StringTrieBuilder
@Deprecated protected int getMaxLinearMatchLength()
getMaxLinearMatchLength
in class StringTrieBuilder
@Deprecated protected int write(int unit)
write
in class StringTrieBuilder
@Deprecated protected int write(int offset, int length)
write
in class StringTrieBuilder
@Deprecated protected int writeValueAndFinal(int i, boolean isFinal)
writeValueAndFinal
in class StringTrieBuilder
@Deprecated protected int writeValueAndType(boolean hasValue, int value, int node)
writeValueAndType
in class StringTrieBuilder
@Deprecated protected int writeDeltaTo(int jumpTarget)
writeDeltaTo
in class StringTrieBuilder
Copyright © 2016 Unicode, Inc. and others.