Class CharRange.CharacterIterator

java.lang.Object
org.apache.commons.lang3.CharRange.CharacterIterator
All Implemented Interfaces:
Iterator<Character>
Enclosing class:
CharRange

private static final class CharRange.CharacterIterator extends Object implements Iterator<Character>
Character Iterator.

#NotThreadSafe#

  • Field Details

    • current

      private char current
      The current character
    • range

      private final CharRange range
    • hasNext

      private boolean hasNext
  • Constructor Details

    • CharacterIterator

      private CharacterIterator(CharRange r)
      Constructs a new iterator for the character range.
      Parameters:
      r - The character range
  • Method Details

    • hasNext

      public boolean hasNext()
      Has the iterator not reached the end character yet?
      Specified by:
      hasNext in interface Iterator<Character>
      Returns:
      true if the iterator has yet to reach the character date
    • next

      public Character next()
      Returns the next character in the iteration
      Specified by:
      next in interface Iterator<Character>
      Returns:
      Character for the next character
    • prepareNext

      private void prepareNext()
      Prepares the next character in the range.
    • remove

      public void remove()
      Always throws UnsupportedOperationException.
      Specified by:
      remove in interface Iterator<Character>
      Throws:
      UnsupportedOperationException - Always thrown.
      See Also: