org.jikesrvm.util
Class LinkedListIteratorRVM<T>

java.lang.Object
  extended by org.jikesrvm.util.LinkedListIteratorRVM<T>
All Implemented Interfaces:
Iterator<T>, ListIterator<T>

public final class LinkedListIteratorRVM<T>
extends Object
implements ListIterator<T>


Field Summary
(package private)  boolean canRemove
           
private  LinkedListRVM.Element<T> cursor
          Pointer to the current (most recently returned) element.
(package private)  LinkedListRVM<T> l
          The list we are iterating over
 
Constructor Summary
LinkedListIteratorRVM(LinkedListRVM<T> l)
          Constructor
 
Method Summary
 void add(T arg0)
           
 boolean hasNext()
           
 boolean hasPrevious()
           
 T next()
           
 int nextIndex()
           
 T previous()
           
 int previousIndex()
           
 void remove()
           
 void set(Object arg0)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

canRemove

boolean canRemove

l

final LinkedListRVM<T> l
The list we are iterating over


cursor

private LinkedListRVM.Element<T> cursor
Pointer to the current (most recently returned) element.

Constructor Detail

LinkedListIteratorRVM

LinkedListIteratorRVM(LinkedListRVM<T> l)
Constructor

Parameters:
l - The list to iterate over.
Method Detail

add

public void add(T arg0)
Specified by:
add in interface ListIterator<T>

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<T>
Specified by:
hasNext in interface ListIterator<T>

hasPrevious

public boolean hasPrevious()
Specified by:
hasPrevious in interface ListIterator<T>

next

public T next()
Specified by:
next in interface Iterator<T>
Specified by:
next in interface ListIterator<T>

remove

public void remove()
Specified by:
remove in interface Iterator<T>
Specified by:
remove in interface ListIterator<T>

nextIndex

public int nextIndex()
Specified by:
nextIndex in interface ListIterator<T>

previous

public T previous()
Specified by:
previous in interface ListIterator<T>

previousIndex

public int previousIndex()
Specified by:
previousIndex in interface ListIterator<T>

set

public void set(Object arg0)
Specified by:
set in interface ListIterator<T>