Class SingleElementListIterator<E>

  • All Implemented Interfaces:
    Iterator<E>, ListIterator<E>

    public class SingleElementListIterator<E>
    extends Object
    implements ListIterator<E>
    A SingleElementListIterator holds a single element and returns it with the first call to next(), at which point it will return false to any subsequent call to hasNext(). Likewise, it will return false to a call to hasPrevious() until a call to next(), at which point a call to previous() will return the single element.
    Since:
    2.4
    Version:
    2.4