Class CharRange.CharacterIterator

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

private static class CharRange.CharacterIterator extends Object implements Iterator
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)
      Construct a new iterator for the character range.
      Parameters:
      r - The character range
  • Method Details

    • prepareNext

      private void prepareNext()
      Prepare the next character in the range.
    • hasNext

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

      public Object next()
      Return the next character in the iteration
      Specified by:
      next in interface Iterator
      Returns:
      Character for the next character
    • remove

      public void remove()
      Always throws UnsupportedOperationException.
      Specified by:
      remove in interface Iterator
      Throws:
      UnsupportedOperationException
      See Also: