org.gjt.rec.util
Class EmptyIterator

java.lang.Object
  |
  +--org.gjt.rec.util.EmptyIterator
All Implemented Interfaces:
Iterator

public final class EmptyIterator
extends Object
implements Iterator

An iterator with no elements. This class is a Singleton.

Author:
Neil Stockbridge

Field Summary
static String REVISION
           
 
Method Summary
 boolean hasNext()
           
 Object next()
           
static EmptyIterator onlyInstance()
          Checks to see if the only instance of this class allowed has been created and creates it if it has not.
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Method Detail

onlyInstance

public static EmptyIterator onlyInstance()
Checks to see if the only instance of this class allowed has been created and creates it if it has not.

Returns:
The only instance of this class allowed in the VM.

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator

next

public Object next()
Specified by:
next in interface Iterator

remove

public void remove()
Specified by:
remove in interface Iterator