java.util.Iterator<E>
, java.util.ListIterator<E>
public class MyLinkedList.MyLinkedListIterator
extends java.lang.Object
implements java.util.ListIterator<E>
Modifier and Type | Field | Description |
---|---|---|
(package private) MyLinkedList.Node |
cursor |
Constructor | Description |
---|---|
MyLinkedListIterator() |
Modifier and Type | Method | Description |
---|---|---|
void |
add(E e) |
|
boolean |
hasNext() |
|
boolean |
hasPrevious() |
|
E |
next() |
|
int |
nextIndex() |
|
E |
previous() |
|
int |
previousIndex() |
|
void |
remove() |
|
void |
set(E e) |
final MyLinkedList.Node cursor
public boolean hasNext()
public E next()
public boolean hasPrevious()
hasPrevious
in interface java.util.ListIterator<E>
public int nextIndex()
nextIndex
in interface java.util.ListIterator<E>
public int previousIndex()
previousIndex
in interface java.util.ListIterator<E>
public void remove()