Interface LinkedListIterator<E>

All Superinterfaces:
AutoCloseable, Iterator<E>
All Known Subinterfaces:
PageIterator
All Known Implementing Classes:
LinkedListImpl.Iterator

public interface LinkedListIterator<E> extends Iterator<E>, AutoCloseable
A LinkedListIterator

This iterator allows the last element to be repeated in the next call to hasNext or next

  • Method Details

    • repeat

      void repeat()
    • removeLastElement

      E removeLastElement()
      This method is doing exactly what Iterator.remove() would do, however it will return the element being removed.
    • close

      void close()
      Specified by:
      close in interface AutoCloseable