Package org.apache.commons.lang3
Class CharRange.CharacterIterator
java.lang.Object
org.apache.commons.lang3.CharRange.CharacterIterator
- Enclosing class:
- CharRange
private static final class CharRange.CharacterIterator
extends Object
implements Iterator<Character>
Character
Iterator.
#NotThreadSafe#
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateConstructs a new iterator for the character range. -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasNext()Tests whether this iterator reached the end character.next()Returns the next character in the iteration.private voidPrepares the next character in the range.voidremove()Always throwsUnsupportedOperationException.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
current
private char currentThe current character -
range
-
hasNext
private boolean hasNext
-
-
Constructor Details
-
CharacterIterator
Constructs a new iterator for the character range.- Parameters:
r- The character range.
-
-
Method Details
-
hasNext
public boolean hasNext()Tests whether this iterator reached the end character. -
next
Returns the next character in the iteration. -
prepareNext
private void prepareNext()Prepares the next character in the range. -
remove
public void remove()Always throwsUnsupportedOperationException.- Specified by:
removein interfaceIterator<Character>- Throws:
UnsupportedOperationException- Thrown because this operation is unsupported.- See Also:
-