| Modifier and Type | Field and Description |
|---|---|
| private int | cursorPos
Cursor position. |
| private final RuleBasedTransliterator. | data
Object that translates stand-in characters in 'output' to UnicodeReplacer objects. |
| private boolean | hasCursor
True if this object outputs a cursor position. |
| private boolean | isComplex
A complex object contains nested replacers and requires more complex processing. |
| private String | output
Output text, possibly containing stand-in characters that represent nested UnicodeReplacers. |
| Access | Constructor and Description |
|---|---|
| public | StringReplacer(String
text that will replace input text when the
replace() method is called. May contain stand-in characters
that represent nested replacers. theOutput, int cursor position that will be returned by
the replace() method theCursorPos, RuleBasedTransliterator.transliterator context object that translates
stand-in characters to UnicodeReplacer objects theDataConstruct a StringReplacer that sets the emits the given output text and sets the cursor to the given position. |
| public | StringReplacer(String
text that will replace input text when the
replace() method is called. May contain stand-in characters
that represent nested replacers. theOutput, RuleBasedTransliterator.transliterator context object that translates
stand-in characters to UnicodeReplacer objects theDataConstruct a StringReplacer that sets the emits the given output text and does not modify the cursor. |
| Modifier and Type | Method and Description |
|---|---|
| public void | addReplacementSetTo(UnicodeSet
the set into which to union the output characters toUnionTo)Implements com. |
| public int | replace(Replaceable
the text to be matched text, int inclusive start index of text to be replaced start, int exclusive end index of text to be replaced;
must be greater than or equal to start limit, int[] output parameter for the cursor position.
Not all replacer objects will update this, but in a complete
tree of replacer objects, representing the entire output side
of a transliteration rule, at least one must update it. cursor)Implements com. |
| public String | toReplacerPattern(boolean
if true then convert unprintable
character to their hex escape representations, \\uxxxx or
\\Uxxxxxxxx. Unprintable characters are defined by
Utility.isUnprintable(). escapeUnprintable)Implements com. |
| cursorPos | back to summary |
|---|---|
| private int cursorPos Cursor position. Value is ignored if hasCursor is false. | |
| data | back to summary |
|---|---|
| private final RuleBasedTransliterator. Object that translates stand-in characters in 'output' to UnicodeReplacer objects. | |
| hasCursor | back to summary |
|---|---|
| private boolean hasCursor True if this object outputs a cursor position. | |
| isComplex | back to summary |
|---|---|
| private boolean isComplex A complex object contains nested replacers and requires more complex processing. StringReplacers are initially assumed to be complex. If no nested replacers are seen during processing, then isComplex is set to false, and future replacements are short circuited for better performance. | |
| output | back to summary |
|---|---|
| private String output Output text, possibly containing stand-in characters that represent nested UnicodeReplacers. | |
| StringReplacer | back to summary |
|---|---|
| public StringReplacer(String theOutput, int theCursorPos, RuleBasedTransliterator. Construct a StringReplacer that sets the emits the given output text and sets the cursor to the given position.
| |
| StringReplacer | back to summary |
|---|---|
| public StringReplacer(String theOutput, RuleBasedTransliterator. Construct a StringReplacer that sets the emits the given output text and does not modify the cursor.
| |
| addReplacementSetTo | back to summary |
|---|---|
| public void addReplacementSetTo(UnicodeSet toUnionTo) Implements com. Union the set of all characters that may output by this object into the given set.
| |
| replace | back to summary |
|---|---|
| public int replace(Replaceable text, int start, int limit, int[] cursor) Implements com. UnicodeReplacer API
| |
| toReplacerPattern | back to summary |
|---|---|
| public String toReplacerPattern(boolean escapeUnprintable) Implements com. UnicodeReplacer API
| |