Todo
this is an internal class, and only temporary. Remove it once we have \b notation in Transliterator.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private BreakIterator | |
| private int[] | |
| private int | |
| private String | |
| pack-priv static final int |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addSourceTargetSet(UnicodeSet inputFilter, UnicodeSet sourceSet, UnicodeSet
TODO targetSet)Overrides com. |
| public BreakIterator | |
| public String | |
| protected synchronized void | handleTransliterate(Replaceable
the buffer holding transliterated and
untransliterated text text, Transliterator.the indices indicating the start, limit, context
start, and context limit of the text. pos,if true, assume more text may be inserted at
incremental)pos.limit and act accordingly. Otherwise,
transliterate all text between pos.start and
pos.limit and move pos.start up to
pos.limit.Implements abstract com. |
| pack-priv static void | |
| public void | |
| public void |
| bi | back to summary |
|---|---|
| private BreakIterator bi | |
| boundaries | back to summary |
|---|---|
| private int[] boundaries | |
| boundaryCount | back to summary |
|---|---|
| private int boundaryCount | |
| insertion | back to summary |
|---|---|
| private String insertion | |
| LETTER_OR_MARK_MASK | back to summary |
|---|---|
| pack-priv static final int LETTER_OR_MARK_MASK | |
| BreakTransliterator | back to summary |
|---|---|
| public BreakTransliterator(String ID, UnicodeFilter filter, BreakIterator bi, String insertion) | |
| BreakTransliterator | back to summary |
|---|---|
| public BreakTransliterator(String ID, UnicodeFilter filter) | |
| addSourceTargetSet | back to summary |
|---|---|
| public void addSourceTargetSet(UnicodeSet inputFilter, UnicodeSet sourceSet, UnicodeSet targetSet) Overrides com. Doc from com. Returns the set of all characters that may be generated as replacement text by this transliterator, filtered by BOTH the input filter, and the current getFilter(). SHOULD BE OVERRIDDEN BY SUBCLASSES. It is probably an error for any transliterator to NOT override this, but we can't force them to for backwards compatibility. Other methods vector through this. When gathering the information on source and target, the compound transliterator makes things complicated. For example, suppose we have: Global FILTER = [ax] a > b; :: NULL; b > c; x > d;While the filter just allows a and x, b is an intermediate result, which could produce c. So the source and target sets cannot be gathered independently. What we have to do is filter the sources for the first transliterator according to the global filter, intersect that transliterator's filter. Based on that we get the target. The next transliterator gets as a global filter (global + last target). And so on. There is another complication: Global FILTER = [ax] a >|b; b >c;Even though b would be filtered from the input, whenever we have a backup, it could be part of the input. So ideally we will change the global filter as we go.
| |
| getBreakIterator | back to summary |
|---|---|
| public BreakIterator getBreakIterator() | |
| getInsertion | back to summary |
|---|---|
| public String getInsertion() | |
| handleTransliterate | back to summary |
|---|---|
| protected synchronized void handleTransliterate(Replaceable text, Transliterator. Implements abstract com. Doc from com. Abstract method that concrete subclasses define to implement
their transliteration algorithm. This method handles both
incremental and non-incremental transliteration. Let
Implementations of this method should also obey the following invariants:
Subclasses may safely assume that all characters in
[ This method is not for public consumption. Calling
this method directly will transliterate
[
| |
| register | back to summary |
|---|---|
| pack-priv static void register() Registers standard variants with the system. Called by Transliterator during initialization. | |
| setBreakIterator | back to summary |
|---|---|
| public void setBreakIterator(BreakIterator bi) | |
| setInsertion | back to summary |
|---|---|
| public void setInsertion(String insertion) | |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private int | |
| private int | |
| private Replaceable |
| Access | Constructor and Description |
|---|---|
| public | ReplaceableCharacterIterator(Replaceable
The String to be iterated over text, int Index of the first character begin, int Index of the character following the last character end, int Initial iterator position pos)Constructs an iterator over the given range of the given string, with the index set at the specified position. |
| Modifier and Type | Method and Description |
|---|---|
| public Object | Returns: A copy of thisOverrides java. Implements java. |
| public char | current()
Implements java. |
| public boolean | Returns: true if the given obj is the same as this ReplaceableCharacterIterator object; false otherwise.the ReplaceableCharacterIterator object to be compared with. obj)Overrides java. |
| public char | first()
Implements java. |
| public int | getBeginIndex()
Implements java. |
| public int | getEndIndex()
Implements java. |
| public int | getIndex()
Implements java. |
| public int | Returns: A hash codeOverrides java. |
| public char | |
| public char | |
| public char | previous()
Implements java. |
| public char | setIndex(int
the position within the text. Valid values range from
getBeginIndex() to getEndIndex(). An IllegalArgumentException is thrown
if an invalid value is supplied. p)Implements java. |
| public void | setText(Replaceable
The String to be iterated over text)Reset this iterator to point to a new string. |
| begin | back to summary |
|---|---|
| private int begin | |
| end | back to summary |
|---|---|
| private int end | |
| pos | back to summary |
|---|---|
| private int pos | |
| text | back to summary |
|---|---|
| private Replaceable text | |
| ReplaceableCharacterIterator | back to summary |
|---|---|
| public ReplaceableCharacterIterator(Replaceable text, int begin, int end, int pos) Constructs an iterator over the given range of the given string, with the index set at the specified position.
| |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Implements java. Creates a copy of this iterator. | |
| current | back to summary |
|---|---|
| public char current() Implements java. Implements CharacterIterator.current() for String.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Compares the equality of two ReplaceableCharacterIterator objects. | |
| first | back to summary |
|---|---|
| public char first() Implements java. Implements CharacterIterator.first() for String.
| |
| getBeginIndex | back to summary |
|---|---|
| public int getBeginIndex() Implements java. Implements CharacterIterator.getBeginIndex() for String.
| |
| getEndIndex | back to summary |
|---|---|
| public int getEndIndex() Implements java. Implements CharacterIterator.getEndIndex() for String.
| |
| getIndex | back to summary |
|---|---|
| public int getIndex() Implements java. Implements CharacterIterator.getIndex() for String.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Computes a hashcode for this iterator.
| |
| last | back to summary |
|---|---|
| public char last() Implements java. Implements CharacterIterator.last() for String.
| |
| next | back to summary |
|---|---|
| public char next() Implements java. Implements CharacterIterator.next() for String.
| |
| previous | back to summary |
|---|---|
| public char previous() Implements java. Implements CharacterIterator.previous() for String.
| |
| setIndex | back to summary |
|---|---|
| public char setIndex(int p) Implements java. Implements CharacterIterator.setIndex() for String.
| |
| setText | back to summary |
|---|---|
| public void setText(Replaceable text) Reset this iterator to point to a new string. This package-visible method is used by other java.text classes that want to avoid allocating new ReplaceableCharacterIterator objects every time their setText method is called.
| |