com.ibm.icu.text
Class DictionaryBasedBreakIterator.Builder
- DictionaryBasedBreakIterator
protected class DictionaryBasedBreakIterator.Builder
The Builder class for DictionaryBasedBreakIterator inherits almost all of
its functionality from the Builder class for RuleBasedBreakIterator_Old, but
extends it with extra logic to handle the DICTIONARY_VAR token
ALL_FLAGS , DONT_LOOP_FLAG , END_STATE_FLAG , LOOKAHEAD_STATE_FLAG , categories , clearLoopingStates , decisionPointList , decisionPointStack , expressions , ignoreChars , loopingStates , mergeList , statesToBackfill , tempStateTable |
Builder() - No special initialization
|
protected void | buildCharCategories(Vector tempRuleList) - The other half of the logic to handle the dictionary characters happens here.
|
protected void | handleSpecialSubstitution(String replace, String replaceWith, int startPos, String description) - We override handleSpecialSubstitution() to add logic to handle
the $dictionary tag.
|
protected void | mungeExpressionList(Hashtable expressions)
|
Builder
public Builder()
No special initialization
buildCharCategories
protected void buildCharCategories(Vector tempRuleList)
The other half of the logic to handle the dictionary characters happens here.
After the inherited builder has derived the real character categories, we
set up the categoryFlags array in the iterator. This array contains "true"
for every character category that includes a dictionary character.
- buildCharCategories in interface RuleBasedBreakIterator_Old.Builder
handleSpecialSubstitution
protected void handleSpecialSubstitution(String replace,
String replaceWith,
int startPos,
String description)
We override handleSpecialSubstitution() to add logic to handle
the $dictionary tag. If we see a substitution named DICTIONARY_VAR,
parse the substitution expression and store the result in
dictionaryChars.
- handleSpecialSubstitution in interface RuleBasedBreakIterator_Old.Builder
Copyright (c) 2006 IBM Corporation and others.