Class ListIteratorWrapper

  • All Implemented Interfaces:
    Iterator, ListIterator, ResettableIterator, ResettableListIterator

    @Deprecated(since="2021-04-30")
    public class ListIteratorWrapper
    extends Object
    implements ResettableListIterator
    Deprecated.
    Commons Collections 3 is in maintenance mode. Commons Collections 4 should be used instead.
    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