structure5
Class AbstractListIterator<E>

java.lang.Object
  extended by structure5.AbstractIterator<E>
      extended by structure5.AbstractListIterator<E>
All Implemented Interfaces:
java.lang.Iterable<E>, java.util.Enumeration<E>, java.util.Iterator<E>, java.util.ListIterator<E>

public abstract class AbstractListIterator<E>
extends AbstractIterator<E>
implements java.util.ListIterator<E>

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.


Constructor Summary
AbstractListIterator()
          Default constructor (for base class invocation).
 
Method Summary
 void add(E o)
           
abstract  E get()
          Returns the value currently being considered by the AbstractIterator.
 void remove()
          If implemented, removes the currently visited value from the structure.
 void set(E o)
           
 
Methods inherited from class structure5.AbstractIterator
hasMoreElements, hasNext, iterator, next, nextElement, reset, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.ListIterator
hasNext, hasPrevious, next, nextIndex, previous, previousIndex
 

Constructor Detail

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.

Postcondition:
does nothing
Method Detail

get

public abstract E 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.

Specified by:
get in class AbstractIterator<E>
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 java.util.Iterator<E>
Specified by:
remove in interface java.util.ListIterator<E>
Overrides:
remove in class AbstractIterator<E>

set

public void set(E o)
Specified by:
set in interface java.util.ListIterator<E>

add

public void add(E o)
Specified by:
add in interface java.util.ListIterator<E>