public class MyLinkedList.MyListIterator
extends java.lang.Object
implements java.util.ListIterator<T>
Constructor and Description |
---|
MyListIterator() |
MyListIterator(int initial_index)
Initialize a ListItroator<T> and set index to its argument
|
Modifier and Type | Method and Description |
---|---|
void |
add(T item) |
boolean |
hasNext() |
boolean |
hasPrevious() |
T |
next() |
int |
nextIndex() |
T |
previous() |
int |
previousIndex() |
void |
remove() |
void |
set(T item) |
public MyListIterator()
public MyListIterator(int initial_index)
initial_index
- is the initial index for nextindex()public boolean hasNext()
public T next()
public int nextIndex()
nextIndex
in interface java.util.ListIterator<T>
public boolean hasPrevious()
hasPrevious
in interface java.util.ListIterator<T>
public int previousIndex()
previousIndex
in interface java.util.ListIterator<T>
public void remove()