Interface LinkedListIterator<E>
- All Superinterfaces:
AutoCloseable,Iterator<E>
- All Known Subinterfaces:
PageIterator
- All Known Implementing Classes:
LinkedListImpl.Iterator
A LinkedListIterator
This iterator allows the last element to be repeated in the next call to hasNext or next
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()This method is doing exactly whatIterator.remove()would do, however it will return the element being removed.voidrepeat()Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
Method Details
-
repeat
void repeat() -
removeLastElement
E removeLastElement()This method is doing exactly whatIterator.remove()would do, however it will return the element being removed. -
close
void close()- Specified by:
closein interfaceAutoCloseable
-