Package com.ctc.wstx.util
Class WordSet.Builder
java.lang.Object
com.ctc.wstx.util.WordSet.Builder
- Enclosing class:
WordSet
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchar[]
private void
constructBranch
(int charIndex, int start, int end) Method that is called recursively to build the data representation for a branch, ie.private void
constructLeaf
(int charIndex, int wordIndex) Method called to add leaf entry to word set; basically "here is the rest of the only matching word"private char[]
expand
(int needSpace)
-
Field Details
-
mWords
-
mData
char[] mData -
mSize
int mSizeNumber of characters currently used from mData
-
-
Constructor Details
-
Builder
-
-
Method Details
-
construct
public char[] construct()- Returns:
- Raw character data that contains compressed structure of the word set
-
constructBranch
private void constructBranch(int charIndex, int start, int end) Method that is called recursively to build the data representation for a branch, ie. part of word set tree that still has more than one ending- Parameters:
charIndex
- Index of the character in words to consider for this roundstart
- Index of the first word to be processedend
- Index of the word after last word to be processed (so that number of words isend - start - 1
-
constructLeaf
private void constructLeaf(int charIndex, int wordIndex) Method called to add leaf entry to word set; basically "here is the rest of the only matching word" -
expand
private char[] expand(int needSpace)
-