Class NodePrinter.NodeListIteratorWrapper

  • Enclosing class:
    NodePrinter

    private static final class NodePrinter.NodeListIteratorWrapper
    extends java.lang.Object
    Wrapper for a NodeListIterator that allows the next pointer to be moved to any index.
    • Field Detail

      • _itr

        private java.util.ListIterator _itr
    • Method Detail

      • nextNode

        public Node nextNode()
      • previousNode

        public Node previousNode()
      • currentIndex

        public int currentIndex()
      • moveTo

        public int moveTo​(int index)
        Moves the iterator to a point in the iterator where the next index is index.
      • moveToBeginning

        public void moveToBeginning()
        Move to the initial position in the list (where nextNode() returns the first node in the list
      • moveToFirst

        public void moveToFirst()
        Move to the first postion in the iterator
      • moveToLast

        public void moveToLast()
        Move to the last position in the iterator