de.lmu.ifi.dbs.elki.utilities.iterator
Class EmptyIterator<T>

java.lang.Object
  extended by 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.


Field Summary
protected static EmptyIterator<?> STATIC_INSTANCE
          Static instance
 
Constructor Summary
EmptyIterator()
           
 
Method Summary
 boolean hasNext()
           
 IterableIterator<T> iterator()
           
 T next()
           
 void remove()
           
static
<T> IterableIterator<T>
STATIC()
          Access the static instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATIC_INSTANCE

protected static final EmptyIterator<?> STATIC_INSTANCE
Static instance

Constructor Detail

EmptyIterator

public EmptyIterator()
Method Detail

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.

Release 0.4.0 (2011-09-20_1324)