Package org.eclipse.collections.impl
Class EmptyIterator<T>
java.lang.Object
org.eclipse.collections.impl.EmptyIterator<T>
- All Implemented Interfaces:
Iterator<T>
,ListIterator<T>
A Singleton iterator which is empty and can be used by all empty collections.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
static <T> EmptyIterator
<T> boolean
hasNext()
boolean
next()
int
previous()
int
void
remove()
void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
EmptyIterator
private EmptyIterator()
-
-
Method Details
-
getInstance
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove() -
hasPrevious
public boolean hasPrevious()- Specified by:
hasPrevious
in interfaceListIterator<T>
-
previous
- Specified by:
previous
in interfaceListIterator<T>
-
nextIndex
public int nextIndex()- Specified by:
nextIndex
in interfaceListIterator<T>
-
previousIndex
public int previousIndex()- Specified by:
previousIndex
in interfaceListIterator<T>
-
set
- Specified by:
set
in interfaceListIterator<T>
-
add
- Specified by:
add
in interfaceListIterator<T>
-