Class FObj.FObjIterator

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Method Detail

      • parent

        public FObj parent()
        Returns the parent node for this iterator's list of child nodes
        Specified by:
        parent in interface FONode.FONodeIterator
        Returns:
        the parent node
      • next

        public FONode next()
        Specified by:
        next in interface FONode.FONodeIterator
        Specified by:
        next in interface java.util.Iterator<FONode>
        Specified by:
        next in interface java.util.ListIterator<FONode>
        Returns:
        the next node
      • set

        public void set​(FONode newNode)
        Replace the node at the current index with the given newNode.
        Specified by:
        set in interface FONode.FONodeIterator
        Specified by:
        set in interface java.util.ListIterator<FONode>
        Parameters:
        newNode - the new node
      • add

        public void add​(FONode newNode)
        Add the given newNode at the current position.
        Specified by:
        add in interface FONode.FONodeIterator
        Specified by:
        add in interface java.util.ListIterator<FONode>
        Parameters:
        newNode - the new node
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface FONode.FONodeIterator
        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

        public boolean hasPrevious()
        Specified by:
        hasPrevious in interface FONode.FONodeIterator
        Specified by:
        hasPrevious in interface java.util.ListIterator<FONode>
        Returns:
        true if there is a previous node, false otherwise
      • nextIndex

        public int nextIndex()
        Specified by:
        nextIndex in interface FONode.FONodeIterator
        Specified by:
        nextIndex in interface java.util.ListIterator<FONode>
        Returns:
        the current index
      • previousIndex

        public int previousIndex()
        Specified by:
        previousIndex in interface FONode.FONodeIterator
        Specified by:
        previousIndex in interface java.util.ListIterator<FONode>
        Returns:
        the previous index
      • remove

        public void remove()
        Removes the node at the current position.
        Specified by:
        remove in interface FONode.FONodeIterator
        Specified by:
        remove in interface java.util.Iterator<FONode>
        Specified by:
        remove in interface java.util.ListIterator<FONode>
      • last

        public FONode last()
        Returns the last node in the list, and advances the current position, so that a subsequent call to hasNext() will return false
        Specified by:
        last in interface FONode.FONodeIterator
        Returns:
        the last node in the list
      • first

        public FONode first()
        Returns the first node in the list, and decreases the index, so that a subsequent call to hasPrevious() will return false
        Specified by:
        first in interface FONode.FONodeIterator
        Returns:
        the first node in the list