| java.lang.Object com.ibm.icu.text.TransliterationRuleSet
TransliterationRuleSet | class TransliterationRuleSet (Code) | | A set of rules for a RuleBasedTransliterator . This set encodes
the transliteration in one direction from one set of characters or short
strings to another. A RuleBasedTransliterator consists of up to
two such sets, one for the forward direction, and one for the reverse.
A TransliterationRuleSet has one important operation, that of
finding a matching rule at a given point in the text. This is accomplished
by the findMatch() method.
Copyright © IBM Corporation 1999. All rights reserved.
author: Alan Liu |
TransliterationRuleSet | public TransliterationRuleSet()(Code) | | Construct a new empty rule set.
|
addRule | public void addRule(TransliterationRule rule)(Code) | | Add a rule to this set. Rules are added in order, and order is
significant.
Parameters: rule - the rule to add |
freeze | public void freeze()(Code) | | Close this rule set to further additions, check it for masked rules,
and index it to optimize performance.
exception: IllegalArgumentException - if some rules are masked |
getMaximumContextLength | public int getMaximumContextLength()(Code) | | Return the maximum context length.
the length of the longest preceding context. |
getSourceTargetSet | UnicodeSet getSourceTargetSet(boolean getTarget)(Code) | | Return the set of all characters that may be modified (getTarget=false)
or emitted (getTarget=true) by this set.
|
toRules | String toRules(boolean escapeUnprintable)(Code) | | Create rule strings that represents this rule set.
|
transliterate | public boolean transliterate(Replaceable text, Transliterator.Position pos, boolean incremental)(Code) | | Transliterate the given text with the given UTransPosition
indices. Return TRUE if the transliteration should continue
or FALSE if it should halt (because of a U_PARTIAL_MATCH match).
Note that FALSE is only ever returned if isIncremental is TRUE.
Parameters: text - the text to be transliterated Parameters: pos - the position indices, which will be updated Parameters: incremental - if TRUE, assume new text may be insertedat index.limit, and return FALSE if thre is a partial match. TRUE unless a U_PARTIAL_MATCH has been obtained,indicating that transliteration should stop until more textarrives. |
|
|