org.rutil.collection
Class AbstractListIterator<E>

java.lang.Object
  extended by org.rutil.collection.AbstractIterator<E>
      extended by org.rutil.collection.AbstractListIterator<E>
All Implemented Interfaces:
java.util.Iterator<E>, java.util.ListIterator<E>

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

An index based datastructure backed iterator implementation. Implementors need to implement the abstract methods in AbstractIterator

Author:
mohan
See Also:
AbstractIterator

Field Summary
 
Fields inherited from class org.rutil.collection.AbstractIterator
curIndex
 
Constructor Summary
AbstractListIterator()
           
AbstractListIterator(int curIndex)
           
 
Method Summary
 void add(E e)
           
 boolean hasPrevious()
           
 int nextIndex()
           
 E previous()
           
 int previousIndex()
           
 void set(E e)
           
 
Methods inherited from class org.rutil.collection.AbstractIterator
get, hasNext, next, remove, size
 
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, next, remove
 

Constructor Detail

AbstractListIterator

public AbstractListIterator()

AbstractListIterator

public AbstractListIterator(int curIndex)
Method Detail

hasPrevious

public boolean hasPrevious()
Specified by:
hasPrevious in interface java.util.ListIterator<E>

previous

public E previous()
Specified by:
previous in interface java.util.ListIterator<E>

nextIndex

public int nextIndex()
Specified by:
nextIndex in interface java.util.ListIterator<E>

previousIndex

public int previousIndex()
Specified by:
previousIndex in interface java.util.ListIterator<E>

set

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

add

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