org.apache.fop.fo

## Interface FONode.FONodeIterator

- All Superinterfaces:
    java.util.Iterator<FONode>, java.util.ListIterator<FONode>
  All Known Implementing Classes:
    FObj.FObjIterator
  Enclosing class:
    FONode

      public static interface FONode.FONodeIterator
      extends java.util.ListIterator<FONode>

  Base iterator interface over a FO's children, offering three methods on top of the base interface methods.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(FONode newNode)` Add the given `newNode` at the current position.
    `FONode` | `first()` Returns the first node in the list, and decreases the index, so that a subsequent call to `hasPrevious()` will return `false`
    `boolean` | `hasNext()`
    `boolean` | `hasPrevious()`
    `FONode` | `last()` Returns the last node in the list, and advances the current position, so that a subsequent call to `hasNext()` will return `false`
    `FONode` | `next()`
    `int` | `nextIndex()`
    `FObj` | `parent()` Returns the parent node for this iterator's list of child nodes
    `FONode` | `previous()`
    `int` | `previousIndex()`
    `void` | `remove()` Removes the node at the current position.
    `void` | `set(FONode newNode)` Replace the node at the current index with the given `newNode`.

- - ### Method Detail

    - #### next

          FONode next()

      Specified by:
        `next` in interface `java.util.Iterator<FONode>`
      Specified by:
        `next` in interface `java.util.ListIterator<FONode>`
      Returns:
        the next node

    - #### previous

          FONode previous()

      Specified by:
        `previous` in interface `java.util.ListIterator<FONode>`
      Returns:
        the previous node

    - #### set

          void set(FONode newNode)

      Replace the node at the current index with the given `newNode`.
      Specified by:
        `set` in interface `java.util.ListIterator<FONode>`
      Parameters:
        `newNode` - the new node

    - #### add

          void add(FONode newNode)

      Add the given `newNode` at the current position.
      Specified by:
        `add` in interface `java.util.ListIterator<FONode>`
      Parameters:
        `newNode` - the new node

    - #### hasNext

          boolean hasNext()

      Specified by:
        `hasNext` in interface `java.util.Iterator<FONode>`
      Specified by:
        `hasNext` in interface `java.util.ListIterator<FONode>`
      Returns:
        `true` if there is a next node, `false` otherwise

    - #### hasPrevious

          boolean hasPrevious()

      Specified by:
        `hasPrevious` in interface `java.util.ListIterator<FONode>`
      Returns:
        `true` if there is a previous node, `false` otherwise

    - #### nextIndex

          int nextIndex()

      Specified by:
        `nextIndex` in interface `java.util.ListIterator<FONode>`
      Returns:
        the current index

    - #### previousIndex

          int previousIndex()

      Specified by:
        `previousIndex` in interface `java.util.ListIterator<FONode>`
      Returns:
        the previous index

    - #### remove

          void remove()

      Removes the node at the current position.
      Specified by:
        `remove` in interface `java.util.Iterator<FONode>`
      Specified by:
        `remove` in interface `java.util.ListIterator<FONode>`

    - #### parent

          FObj parent()

      Returns the parent node for this iterator's list of child nodes
      Returns:
        the parent node

    - #### first

          FONode first()

      Returns the first node in the list, and decreases the index, so that a subsequent call to `hasPrevious()` will return `false`
      Returns:
        the first node in the list

    - #### last

          FONode last()

      Returns the last node in the list, and advances the current position, so that a subsequent call to `hasNext()` will return `false`
      Returns:
        the last node in the list

Copyright 1999-2019 The Apache Software Foundation. All Rights Reserved.