Class StringCharIterator

java.lang.Object
org.apache.fop.fo.CharIterator
org.apache.fop.fo.StringCharIterator
All Implemented Interfaces:
Cloneable, Iterator

public class StringCharIterator extends CharIterator
Class providing an (FO flavored) char iterator for a string.
  • Constructor Details

    • StringCharIterator

      public StringCharIterator(String s)
      Constructor
      Parameters:
      s - the character that this iterator should iterate.
  • Method Details

    • hasNext

      public boolean hasNext()
      Description copied from class: CharIterator
      Specified by:
      hasNext in interface Iterator
      Specified by:
      hasNext in class CharIterator
      Returns:
      true if there is another element in the collection over which to iterate (since this iterator only handles one character, this will return false if it is past that character).
    • nextChar

      public char nextChar() throws NoSuchElementException
      Specified by:
      nextChar in class CharIterator
      Returns:
      the next character, if there is one (since there is only one character over which to iterate, it must be the first character).
      Throws:
      NoSuchElementException - if past the first character