net.sf.beanlib.util
Class ArrayDeque.DeqIterator

java.lang.Object
  extended by net.sf.beanlib.util.ArrayDeque.DeqIterator
All Implemented Interfaces:
Iterator<E>
Enclosing class:
ArrayDeque<E>

private class ArrayDeque.DeqIterator
extends Object
implements Iterator<E>


Field Summary
private  int cursor
          Index of element to be returned by subsequent call to next.
private  int fence
          Tail recorded at construction (also in remove), to stop iterator and also to check for comodification.
private  int lastRet
          Index of element returned by most recent call to next.
 
Constructor Summary
private ArrayDeque.DeqIterator()
           
 
Method Summary
 boolean hasNext()
           
 E next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cursor

private int cursor
Index of element to be returned by subsequent call to next.


fence

private int fence
Tail recorded at construction (also in remove), to stop iterator and also to check for comodification.


lastRet

private int lastRet
Index of element returned by most recent call to next. Reset to -1 if element is deleted by a call to remove.

Constructor Detail

ArrayDeque.DeqIterator

private ArrayDeque.DeqIterator()
Method Detail

hasNext

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

next

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

remove

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