public class CharIterator extends Object implements Iterator<Character>
CharSequence (a String,
StringBuilder etc.). If the CharSequence provided is mutable, and the
contents are changed during the life of the CharIterator, the results are
undefined.| Constructor and Description |
|---|
CharIterator(CharSequence seq)
Construct a
CharIterator over an entire CharSequence. |
CharIterator(CharSequence seq,
int start,
int end)
Construct a
CharIterator with a given CharSequence, specifying the start
and end points. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
Character |
next() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining, removepublic CharIterator(CharSequence seq, int start, int end)
CharIterator with a given CharSequence, specifying the start
and end points.seq - the CharSequencestart - the start indexend - the end indexIndexOutOfBoundsException - if the start or end index is invalidpublic CharIterator(CharSequence seq)
CharIterator over an entire CharSequence.seq - the CharSequenceCopyright © 2020. All rights reserved.