structure
Class AbstractListIterator
java.lang.Object
|
+--structure.AbstractIterator
|
+--structure.AbstractListIterator
- All Implemented Interfaces:
- Enumeration, Iterator, ListIterator
- public abstract class AbstractListIterator
- extends AbstractIterator
- implements ListIterator
Base class for the implementation of a list Iterator.
The methods provided in this class have no executable bodies and will throw
errors if the user attempts to invoke them.
Method Summary |
void |
add(Object o)
|
abstract Object |
get()
Returns the value currently being considered by the AbstractIterator. |
void |
remove()
If implemented, removes the currently visited value from the structure. |
void |
set(Object o)
|
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
AbstractListIterator
public AbstractListIterator()
- Default constructor (for base class invocation).
Does nothing.
Remind Sun (jdk-comments@java.sun.com) that automatically implemented default
constructors are a silly thing.
get
public abstract Object get()
- Description copied from class:
AbstractIterator
- Returns the value currently being considered by the AbstractIterator.
This method is required by neither
Iterator
nor
Enumeration
. This method should be implemented,
however, to provide better support for for
-loops.
- Overrides:
get
in class AbstractIterator
- Following copied from class:
structure.AbstractIterator
- Returns:
- the next value to be considered in iterator
remove
public void remove()
- Description copied from class:
AbstractIterator
- If implemented, removes the currently visited value from the structure.
remove
should not be called unless it is overridden.
- Specified by:
remove
in interface ListIterator
- Overrides:
remove
in class AbstractIterator
set
public void set(Object o)
- Specified by:
set
in interface ListIterator
add
public void add(Object o)
- Specified by:
add
in interface ListIterator