de.lmu.ifi.dbs.elki.utilities.iterator
Class EmptyIterator<T>
java.lang.Object
de.lmu.ifi.dbs.elki.utilities.iterator.EmptyIterator<T>
- Type Parameters:
T
- Data type
- All Implemented Interfaces:
- IterableIterator<T>, Iterable<T>, Iterator<T>
public final class EmptyIterator<T>
- extends Object
- implements IterableIterator<T>, Iterator<T>, Iterable<T>
Empty iterator, that never returns any data.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STATIC_INSTANCE
protected static final EmptyIterator<?> STATIC_INSTANCE
- Static instance
EmptyIterator
public EmptyIterator()
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator<T>
next
public T next()
- Specified by:
next
in interface Iterator<T>
remove
public void remove()
- Specified by:
remove
in interface Iterator<T>
iterator
public IterableIterator<T> iterator()
- Specified by:
iterator
in interface Iterable<T>
STATIC
public static <T> IterableIterator<T> STATIC()
- Access the static instance.
- Type Parameters:
T
- type to (not) iterate over
- Returns:
- Cast static instance.