Package de.linusdev.lutils.llist
Class LLinkedListIterator<O>
java.lang.Object
de.linusdev.lutils.llist.LLinkedListIterator<O>
- Type Parameters:
O- element class
- All Implemented Interfaces:
Iterator<O>,ListIterator<O>
It is not recommended to use any index based methods. If the list is modified during iteration,
the indices may be wrong.
-
Constructor Summary
ConstructorsConstructorDescriptionLLinkedListIterator(@NotNull LLinkedList<O> list) LLinkedListIterator(@NotNull LLinkedList<O> list, int index, @Nullable LLinkedListEntry<O> lastEntry, @NotNull LLinkedListEntry<O> currentEntry) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
LLinkedListIterator
-
LLinkedListIterator
public LLinkedListIterator(@NotNull @NotNull LLinkedList<O> list, int index, @Nullable @Nullable LLinkedListEntry<O> lastEntry, @NotNull @NotNull LLinkedListEntry<O> currentEntry)
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
hasPrevious
public boolean hasPrevious()- Specified by:
hasPreviousin interfaceListIterator<O>
-
previous
reversed traversal is not supported by this iterator.- Specified by:
previousin interfaceListIterator<O>- Throws:
UnsupportedOperationException- always.
-
nextIndex
public int nextIndex()It is not recommended to use any index based methods. If the list is modified during iteration, the indices may be wrong.- Specified by:
nextIndexin interfaceListIterator<O>
-
previousIndex
public int previousIndex()It is not recommended to use any index based methods. If the list is modified during iteration, the indices may be wrong.- Specified by:
previousIndexin interfaceListIterator<O>
-
remove
public void remove() -
set
- Specified by:
setin interfaceListIterator<O>
-
add
- Specified by:
addin interfaceListIterator<O>
-