public final class EmptyIterator<T>
extends java.lang.Object
implements java.util.Iterator<T>
| Modifier and Type | Field and Description |
|---|---|
(package private) static EmptyIterator<java.lang.Object> |
sInstance |
| Modifier | Constructor and Description |
|---|---|
private |
EmptyIterator() |
| Modifier and Type | Method and Description |
|---|---|
static <T> EmptyIterator<T> |
getInstance()
Since the actual type has no effect (as this iterator
never returns any value objects), we can just cast away
here: bit unclean, but safe.
|
boolean |
hasNext() |
T |
next() |
void |
remove() |
static final EmptyIterator<java.lang.Object> sInstance
public static <T> EmptyIterator<T> getInstance()
public boolean hasNext()
hasNext in interface java.util.Iterator<T>public void remove()
remove in interface java.util.Iterator<T>