|
DthingApi
|
Public Member Functions | |
| void | add (E object) |
| boolean | hasNext () |
| boolean | hasPrevious () |
| E | next () |
| int | nextIndex () |
| E | previous () |
| int | previousIndex () |
| void | remove () |
| void | set (E object) |
An ListIterator is used to sequence over a List of objects. ListIterator can move backwards or forwards through the list.
| void java.util.ListIterator< E >.add | ( | E | object | ) |
Inserts the specified object into the list between
and
. The object inserted will be the previous object.
| object | the object to insert. |
| UnsupportedOperationException | if adding is not supported by the list being iterated. |
| ClassCastException | if the class of the object is inappropriate for the list. |
| IllegalArgumentException | if the object cannot be added to the list. |
| boolean java.util.ListIterator< E >.hasNext | ( | ) |
Returns whether there are more elements to iterate.
Implements java.util.Iterator< E >.
| boolean java.util.ListIterator< E >.hasPrevious | ( | ) |
Returns whether there are previous elements to iterate.
| E java.util.ListIterator< E >.next | ( | ) |
Returns the next object in the iteration.
| NoSuchElementException | if there are no more elements. |
Implements java.util.Iterator< E >.
| int java.util.ListIterator< E >.nextIndex | ( | ) |
Returns the index of the next object in the iteration.
| NoSuchElementException | if there are no more elements. |
| E java.util.ListIterator< E >.previous | ( | ) |
Returns the previous object in the iteration.
| NoSuchElementException | if there are no previous elements. |
| int java.util.ListIterator< E >.previousIndex | ( | ) |
Returns the index of the previous object in the iteration.
| NoSuchElementException | if there are no previous elements. |
| void java.util.ListIterator< E >.remove | ( | ) |
Removes the last object returned by
or
from the list.
| UnsupportedOperationException | if removing is not supported by the list being iterated. |
| IllegalStateException | if or have not been called, or remove |
Implements java.util.Iterator< E >.
| void java.util.ListIterator< E >.set | ( | E | object | ) |
Replaces the last object returned by
or
with the specified object.
| object | the object to set. |
| UnsupportedOperationException | if setting is not supported by the list being iterated |
| ClassCastException | if the class of the object is inappropriate for the list. |
| IllegalArgumentException | if the object cannot be added to the list. |
| IllegalStateException | if or have not been called, or remove |
1.8.13