net.sf.mmm.util.collection.base
Class CollectionList.ListIterator

java.lang.Object
  extended by net.sf.mmm.util.collection.base.CollectionList.ListIterator
All Implemented Interfaces:
Iterator<E>
Enclosing class:
CollectionList<E>

private class CollectionList.ListIterator
extends Object
implements Iterator<E>

This inner class implements an Iterator for this CollectionList.


Field Summary
private  int cursor
          Index of element to be returned by subsequent call to next.
private  int expectedModCount
          The modCount value that the iterator believes that the backing List should have.
private  int lastRet
          Index of element returned by most recent call to next or previous.
 
Constructor Summary
private CollectionList.ListIterator()
           
 
Method Summary
(package private)  void checkForComodification()
          Checks that the collection has NOT been modified outside this iterator.
 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.


lastRet

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


expectedModCount

private int expectedModCount
The modCount value that the iterator believes that the backing List should have. If this expectation is violated, the iterator has detected concurrent modification.

Constructor Detail

CollectionList.ListIterator

private CollectionList.ListIterator()
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>

checkForComodification

final void checkForComodification()
Checks that the collection has NOT been modified outside this iterator.



Copyright © 2001-2010 mmm-Team. All Rights Reserved.