| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private CharSequence |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | clone()
Overrides java. Implements java. |
| public char | current()
Implements java. |
| public char | first()
Implements java. |
| public int | getBeginIndex()
Implements java. |
| public int | |
| public int | |
| public char | last()
Implements java. |
| public char | next()
Implements java. |
| 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. position)Implements java. |
| CSCharacterIterator | back to summary |
|---|---|
| public CSCharacterIterator(CharSequence text) Constructor.
| |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Implements java. Doc from java. Create a copy of this iterator | |
| current | back to summary |
|---|---|
| public char current() Implements java. Doc from java. Gets the character at the current position (as returned by getIndex()).
| |
| first | back to summary |
|---|---|
| public char first() Implements java. Doc from java. Sets the position to getBeginIndex() and returns the character at that position.
| |
| getBeginIndex | back to summary |
|---|---|
| public int getBeginIndex() Implements java. Doc from java. Returns the start index of the text.
| |
| getEndIndex | back to summary |
|---|---|
| public int getEndIndex() Implements java. Doc from java. Returns the end index of the text. This index is the index of the first character following the end of the text.
| |
| getIndex | back to summary |
|---|---|
| public int getIndex() Implements java. Doc from java. Returns the current index.
| |
| last | back to summary |
|---|---|
| public char last() Implements java. Doc from java. Sets the position to getEndIndex()-1 (getEndIndex() if the text is empty) and returns the character at that position.
| |
| next | back to summary |
|---|---|
| public char next() Implements java. Doc from java. Increments the iterator's index by one and returns the character at the new index. If the resulting index is greater or equal to getEndIndex(), the current index is reset to getEndIndex() and a value of DONE is returned.
| |
| previous | back to summary |
|---|---|
| public char previous() Implements java. Doc from java. Decrements the iterator's index by one and returns the character at the new index. If the current index is getBeginIndex(), the index remains at getBeginIndex() and a value of DONE is returned.
| |
| setIndex | back to summary |
|---|---|
| public char setIndex(int position) Implements java. Doc from java. Sets the position to the specified position in the text and returns that character.
| |