Element(0) Element(1) Element(2) ... Element(n-1)
cursor positions: ^ ^ ^ ^ ^
Note that the remove() and set(Object) methods are
not defined in terms of the cursor position; they are defined to
operate on the last element returned by a call to next() or previous().
This interface is a member of the Java Collections Framework.
| Method Summary | ||
void |
add(E e) Inserts the specified element into the list (optional operation). |
|
boolean |
hasNext() Returns true if this list iterator has more elements when
traversing the list in the forward direction. |
|
boolean |
hasPrevious() Returns true if this list iterator has more elements when
traversing the list in the reverse direction. |
|
| next() Returns the next element in the list. |
||
int |
nextIndex() Returns the index of the element that would be returned by a subsequent
call to next. |
|
| previous() Returns the previous element in the list. |
||
int |
previousIndex() Returns the index of the element that would be returned by a subsequent
call to previous. |
|
void |
remove() Removes from the list the last element that was returned by
next or previous (optional operation). |
|
void |
set(E e) Replaces the last element returned by next or
previous with the specified element (optional operation). |
|