private static class CharRange.CharacterIterator
extends java.lang.Object
implements java.util.Iterator<java.lang.Character>
Iterator
.
#NotThreadSafe#
Modifier and Type | Field and Description |
---|---|
private char |
current
The current character
|
private boolean |
hasNext |
private CharRange |
range |
Modifier | Constructor and Description |
---|---|
private |
CharacterIterator(CharRange r)
Construct a new iterator for the character range.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Has the iterator not reached the end character yet?
|
java.lang.Character |
next()
Return the next character in the iteration
|
private void |
prepareNext()
Prepare the next character in the range.
|
void |
remove()
Always throws UnsupportedOperationException.
|
private char current
private final CharRange range
private boolean hasNext
private CharacterIterator(CharRange r)
r
- The character rangeprivate void prepareNext()
public boolean hasNext()
hasNext
in interface java.util.Iterator<java.lang.Character>
true
if the iterator has yet to reach the character datepublic java.lang.Character next()
next
in interface java.util.Iterator<java.lang.Character>
Character
for the next characterpublic void remove()
remove
in interface java.util.Iterator<java.lang.Character>
java.lang.UnsupportedOperationException
Iterator.remove()