| |
|
| java.lang.Object com.ibm.icu.text.UCharacterIterator com.ibm.icu.impl.ReplaceableUCharacterIterator
ReplaceableUCharacterIterator | public class ReplaceableUCharacterIterator extends UCharacterIterator (Code) | | DLF docs must define behavior when Replaceable is mutated underneath
the iterator.
This and ICUCharacterIterator share some code, maybe they should share
an implementation, or the common state and implementation should be
moved up into UCharacterIterator.
What are first, last, and getBeginIndex doing here?!?!?!
|
Method Summary | |
public Object | clone() | public int | current() Returns the current UTF16 character. | public int | currentCodePoint() | public int | getIndex() Gets the current currentIndex in text. | public int | getLength() | public int | getText(char[] fillIn, int offset) | public int | next() Returns next UTF16 character and increments the iterator's currentIndex by 1. | public int | previous() Returns previous UTF16 character and decrements the iterator's currentIndex by
1. | public void | setIndex(int currentIndex) Sets the currentIndex to the specified currentIndex in the text and returns that
single UTF16 character at currentIndex. |
ReplaceableUCharacterIterator | public ReplaceableUCharacterIterator(Replaceable replaceable)(Code) | | Public constructor
Parameters: replaceable - text which the iterator will be based on |
ReplaceableUCharacterIterator | public ReplaceableUCharacterIterator(String str)(Code) | | Public constructor
Parameters: str - text which the iterator will be based on |
ReplaceableUCharacterIterator | public ReplaceableUCharacterIterator(StringBuffer buf)(Code) | | Public constructor
Parameters: buf - buffer of text on which the iterator will be based |
clone | public Object clone()(Code) | | Creates a copy of this iterator, does not clone the underlying
Replaceable object
copy of this iterator |
current | public int current()(Code) | | Returns the current UTF16 character.
current UTF16 character |
currentCodePoint | public int currentCodePoint()(Code) | | Returns the current codepoint
current codepoint |
getIndex | public int getIndex()(Code) | | Gets the current currentIndex in text.
current currentIndex in text. |
getLength | public int getLength()(Code) | | Returns the length of the text
length of the text |
getText | public int getText(char[] fillIn, int offset)(Code) | | |
next | public int next()(Code) | | Returns next UTF16 character and increments the iterator's currentIndex by 1.
If the resulting currentIndex is greater or equal to the text length, the
currentIndex is reset to the text length and a value of DONECODEPOINT is
returned.
next UTF16 character in text or DONE if the new currentIndex is off the end of the text range. |
previous | public int previous()(Code) | | Returns previous UTF16 character and decrements the iterator's currentIndex by
1.
If the resulting currentIndex is less than 0, the currentIndex is reset to 0 and a
value of DONECODEPOINT is returned.
next UTF16 character in text or DONE if the new currentIndex is off the start of the text range. |
setIndex | public void setIndex(int currentIndex) throws IndexOutOfBoundsException(Code) | | Sets the currentIndex to the specified currentIndex in the text and returns that
single UTF16 character at currentIndex.
This assumes the text is stored as 16-bit code units.
Parameters: currentIndex - the currentIndex within the text. exception: IllegalArgumentException - is thrown if an invalid currentIndex is supplied. i.e. currentIndex is out of bounds. |
|
|
|