org.apache.fop.fo

## Class CharIterator

- java.lang.Object
- - org.apache.fop.fo.CharIterator

- All Implemented Interfaces:
    Cloneable, Iterator
  Direct Known Subclasses:
    NullCharIterator, OneCharIterator, RecursiveCharIterator, StringCharIterator

      public abstract class CharIterator
      extends Object
      implements Iterator, Cloneable

  Abstract base class for iterators that should iterate through a series of characters. Extends the java.util.Iterator interface with some additional functions useful for FOP's management of text.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CharIterator()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `clone()`
    `abstract boolean` | `hasNext()`
    `Object` | `next()`
    `abstract char` | `nextChar()`
    `void` | `remove()`
    `void` | `replaceChar(char c)` Replace the current character managed by the iterator with a specified character?

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.util.Iterator

      `forEachRemaining`

- - ### Constructor Detail

    - #### CharIterator

          public CharIterator()

  - ### Method Detail

    - #### hasNext

          public abstract boolean hasNext()

      Specified by:
        `hasNext` in interface `Iterator`

    - #### nextChar

          public abstract char nextChar()
                                 throws NoSuchElementException

      Returns:
        the character that is the next character in the collection
      Throws:
        `NoSuchElementException` - if there are no more characters (test for this condition with java.util.Iterator.hasNext()).

    - #### next

          public Object next()
                      throws NoSuchElementException

      Specified by:
        `next` in interface `Iterator`
      Throws:
        `NoSuchElementException`

    - #### remove

          public void remove()

      Specified by:
        `remove` in interface `Iterator`

    - #### replaceChar

          public void replaceChar(char c)

      Replace the current character managed by the iterator with a specified character?
      Parameters:
        `c` - character

    - #### clone

          public Object clone()

      Overrides:
        `clone` in class `Object`

Copyright © 2023 Apache Software Foundation. All rights reserved.