Package org.eclipse.collections.impl
Class EmptyIterator<T>
java.lang.Object
org.eclipse.collections.impl.EmptyIterator<T>
- All Implemented Interfaces:
Iterator<T>,ListIterator<T>
public final class EmptyIterator<T> extends Object implements ListIterator<T>
A Singleton iterator which is empty and can be used by all empty collections.
-
Method Summary
Modifier and Type Method Description voidadd(T t)static <T> EmptyIterator<T>getInstance()booleanhasNext()booleanhasPrevious()Tnext()intnextIndex()Tprevious()intpreviousIndex()voidremove()voidset(T t)
-
Method Details
-
getInstance
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove() -
hasPrevious
public boolean hasPrevious()- Specified by:
hasPreviousin interfaceListIterator<T>
-
previous
- Specified by:
previousin interfaceListIterator<T>
-
nextIndex
public int nextIndex()- Specified by:
nextIndexin interfaceListIterator<T>
-
previousIndex
public int previousIndex()- Specified by:
previousIndexin interfaceListIterator<T>
-
set
- Specified by:
setin interfaceListIterator<T>
-
add
- Specified by:
addin interfaceListIterator<T>
-