Class ListIteratorWrapper

java.lang.Object
org.apache.commons.collections.iterators.ListIteratorWrapper
All Implemented Interfaces:
Iterator, ListIterator, ResettableIterator, ResettableListIterator

public class ListIteratorWrapper extends Object implements ResettableListIterator
Converts an iterator into a list iterator by caching the returned entries.

The ListIterator interface has additional useful methods for navigation - previous() and the index methods. This class allows a regular Iterator to behave as a ListIterator. It achieves this by building a list internally of as the underlying iterator is traversed.

The optional operations of ListIterator are not supported.

This class implements ResettableListIterator from Commons Collections 3.2.

Since:
Commons Collections 2.1
Version:
$Revision: 646777 $ $Date: 2008-04-10 14:33:15 +0200 (Thu, 10 Apr 2008) $
Author:
Morgan Delagrange, Stephen Colebourne