©2008 Google -
Code Home -
Site Terms of Service -
Privacy Policy -
Site Directory
Google Code offered in:
中文 -
English -
Português -
Pусский -
Español -
日本語
| java.util.ListIterator<E> | Iterator<E> |
An ListIterator is used to sequence over a List of objects. ListIterator can move backwards or forwards through the List.
| void | add(E object) | |||||
Inserts the specified object into the list between next
and previous. |
||||||
| boolean | hasNext() | |||||
| Returns if there are more elements to iterate. | ||||||
| boolean | hasPrevious() | |||||
| Returns if there are previous elements to iterate. | ||||||
| E | next() | |||||
| Returns the next object in the iteration. | ||||||
| int | nextIndex() | |||||
| Returns the index of the next object in the iteration. | ||||||
| E | previous() | |||||
| Returns the previous object in the iteration. | ||||||
| int | previousIndex() | |||||
| Returns the index of the previous object in the iteration. | ||||||
| void | remove() | |||||
Removes the last object returned by next or
previous from the list. |
||||||
| void | set(E object) | |||||
Replaces the last object returned by next or
previous with the specified object. |
||||||
Methods inherited
from interface
java.util.Iterator
next
and previous. The object inserted will be the previous
object.
| object | the object to insert |
|---|
| UnsupportedOperationException | when adding is not supported by the list being iterated |
|---|---|
| ClassCastException | when the class of the object is inappropriate for the list |
| IllegalArgumentException | when the object cannot be added to the list |
| NoSuchElementException | when there are no more elements |
|---|
| NoSuchElementException | when there are no more elements |
|---|
| NoSuchElementException | when there are no previous elements |
|---|
| NoSuchElementException | when there are no previous elements |
|---|
next or
previous from the list.
| UnsupportedOperationException | when removing is not supported by the list being iterated |
|---|---|
| IllegalStateException | when next or previous have
not been called, or remove or
add have already been called after the last
call to next or previous
|
next or
previous with the specified object.
| object | the object to add |
|---|
| UnsupportedOperationException | when adding is not supported by the list being iterated |
|---|---|
| ClassCastException | when the class of the object is inappropriate for the list |
| IllegalArgumentException | when the object cannot be added to the list |
| IllegalStateException | when next or previous have
not been called, or remove or
add have already been called after the last
call to next or previous
|