com.ibm.icu.text
Class DictionaryBasedBreakIterator.Builder

java.lang.Object
  extended bycom.ibm.icu.text.RuleBasedBreakIterator_Old.Builder
      extended bycom.ibm.icu.text.DictionaryBasedBreakIterator.Builder
Enclosing class:
DictionaryBasedBreakIterator

protected class DictionaryBasedBreakIterator.Builder
extends RuleBasedBreakIterator_Old.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

Status:
Internal. This API is ICU internal only.

Field Summary
 
Fields inherited from class com.ibm.icu.text.RuleBasedBreakIterator_Old.Builder
ALL_FLAGS, categories, clearLoopingStates, decisionPointList, decisionPointStack, DONT_LOOP_FLAG, END_STATE_FLAG, expressions, ignoreChars, LOOKAHEAD_STATE_FLAG, loopingStates, mergeList, statesToBackfill, tempStateTable
 
Constructor Summary
DictionaryBasedBreakIterator.Builder()
          No special initialization
 
Method Summary
protected  void buildCharCategories(java.util.Vector tempRuleList)
          The other half of the logic to handle the dictionary characters happens here.
protected  void handleSpecialSubstitution(java.lang.String replace, java.lang.String replaceWith, int startPos, java.lang.String description)
          We override handleSpecialSubstitution() to add logic to handle the $dictionary tag.
protected  void mungeExpressionList(java.util.Hashtable expressions)
           
 
Methods inherited from class com.ibm.icu.text.RuleBasedBreakIterator_Old.Builder
buildBreakIterator, debugPrintTempStateTable, debugPrintVector, debugPrintVectorOfVectors, error, processSubstitution
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DictionaryBasedBreakIterator.Builder

public DictionaryBasedBreakIterator.Builder()
No special initialization

Status:
Internal. This API is ICU internal only.
Method Detail

handleSpecialSubstitution

protected void handleSpecialSubstitution(java.lang.String replace,
                                         java.lang.String replaceWith,
                                         int startPos,
                                         java.lang.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.

Overrides:
handleSpecialSubstitution in class RuleBasedBreakIterator_Old.Builder
Status:
Internal. This API is ICU internal only.

buildCharCategories

protected void buildCharCategories(java.util.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.

Overrides:
buildCharCategories in class RuleBasedBreakIterator_Old.Builder
Status:
Internal. This API is ICU internal only.

mungeExpressionList

protected void mungeExpressionList(java.util.Hashtable expressions)
Overrides:
mungeExpressionList in class RuleBasedBreakIterator_Old.Builder
Status:
Internal. This API is ICU internal only.


Copyright (c) 2006 IBM Corporation and others.