public class EmptyListIterator<E> extends Object implements ResettableListIterator<E>
This class provides an implementation of an empty list iterator. This class
provides for binary compatibility between Commons Collections 2.1.1 and 3.1
due to issues with IteratorUtils
.
Modifier and Type | Field and Description |
---|---|
static ListIterator |
INSTANCE
Singleton instance of the iterator.
|
static ResettableListIterator |
RESETTABLE_INSTANCE
Singleton instance of the iterator.
|
Modifier | Constructor and Description |
---|---|
protected |
EmptyListIterator()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(E obj) |
static <E> ListIterator<E> |
emptyListIterator()
Get a typed instance of the iterator.
|
boolean |
hasNext() |
boolean |
hasPrevious() |
E |
next() |
int |
nextIndex() |
E |
previous() |
int |
previousIndex() |
void |
remove() |
void |
reset() |
static <E> ResettableListIterator<E> |
resettableEmptyListIterator()
Get a typed instance of the iterator.
|
void |
set(E obj) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, hasNext, hasPrevious, next, nextIndex, previous, previousIndex, remove, set
reset
hasPrevious, previous
public static final ResettableListIterator RESETTABLE_INSTANCE
public static final ListIterator INSTANCE
public static <E> ResettableListIterator<E> resettableEmptyListIterator()
E
- the element typeResettableListIterator
public static <E> ListIterator<E> emptyListIterator()
E
- the element typeListIterator
public boolean hasNext()
public E next()
public boolean hasPrevious()
public E previous()
public int nextIndex()
public int previousIndex()
public void add(E obj)
public void set(E obj)
public void remove()
public void reset()
Copyright © 2001–2013 The Apache Software Foundation. All rights reserved.