| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private char[] | |
| private int |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Object | Returns: A copy of thisOverrides java. Implements java. Create a copy of this iterator |
| public char | Returns: the character at the current position or DONE if the current position is off the end of the text.Implements java. Gets the character at the current position (as returned by getIndex()). |
| public char | Returns: the first character in the text, or DONE if the text is emptyImplements java. Sets the position to getBeginIndex() and returns the character at that position. |
| public int | Returns: the index at which the text begins.Implements java. Returns the start index of the text. |
| public int | Returns: the index after the last character in the textImplements java. Returns the end index of the text. |
| public int | Returns: the current index.Implements java. Returns the current index. |
| public char | Returns: the last character in the text, or DONE if the text is emptyImplements java. Sets the position to getEndIndex()-1 (getEndIndex() if the text is empty) and returns the character at that position. |
| public char | Returns: the character at the new position or DONE if the new position is off the end of the text range.Implements java. Increments the iterator's index by one and returns the character at the new index. |
| public char | Returns: the character at the new position or DONE if the current position is equal to getBeginIndex().Implements java. Decrements the iterator's index by one and returns the character at the new index. |
| pack-priv void | |
| pack-priv void | |
| public char | Returns: the character at the specified position or DONE if the specified position is equal to getEndIndex()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. Sets the position to the specified position in the text and returns that character. |
| begin | back to summary |
|---|---|
| private int begin | |
| chars | back to summary |
|---|---|
| private char[] chars | |
| pos | back to summary |
|---|---|
| private int pos | |
| CharArrayIterator | back to summary |
|---|---|
| pack-priv CharArrayIterator(char[] chars) | |
| CharArrayIterator | back to summary |
|---|---|
| pack-priv CharArrayIterator(char[] chars, int begin) | |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Implements java. Create a copy of this iterator
| |
| current | back to summary |
|---|---|
| public char current() Implements java. Gets the character at the current position (as returned by getIndex()).
| |
| first | back to summary |
|---|---|
| public char first() Implements java. Sets the position to getBeginIndex() and returns the character at that position.
| |
| getBeginIndex | back to summary |
|---|---|
| public int getBeginIndex() Implements java. Returns the start index of the text.
| |
| getEndIndex | back to summary |
|---|---|
| public int getEndIndex() Implements 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. Returns the current index.
| |
| last | back to summary |
|---|---|
| public char last() Implements 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. 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. 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.
| |
| reset | back to summary |
|---|---|
| pack-priv void reset(char[] chars) | |
| reset | back to summary |
|---|---|
| pack-priv void reset(char[] chars, int begin) | |
| setIndex | back to summary |
|---|---|
| public char setIndex(int position) Implements java. Sets the position to the specified position in the text and returns that character.
| |