public interface CharIterator extends Iterator<Character>
Iterator; provides an additional method to avoid
(un)boxing, and the possibility to skip elements.Iterator| Modifier and Type | Method and Description |
|---|---|
Character |
next()
Deprecated.
Please use the corresponding type-specific method instead.
|
char |
nextChar()
Returns the next element as a primitive type.
|
int |
skip(int n)
Skips the given number of elements.
|
forEachRemaining, hasNext, removechar nextChar()
Iterator.next()@Deprecated Character next()
int skip(int n)
The effect of this call is exactly the same as that of calling
next() for n times (possibly stopping if
Iterator.hasNext() becomes false).
n - the number of elements to skip.Iterator.next()