org.objectweb.dream.util
Class EmptyIterator

java.lang.Object
  extended byorg.objectweb.dream.util.EmptyIterator
All Implemented Interfaces:
Iterator

public final class EmptyIterator
extends Object
implements Iterator

An empty iterator implementation. hasNext()always returns false. The constructor is private. As a consequence, only one instance of this class exists, and can be referenced using the INSTANCEconstant.


Field Summary
static EmptyIterator INSTANCE
          The only instance of EmptyIterator
 
Method Summary
 boolean hasNext()
           
 Object next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final EmptyIterator INSTANCE
The only instance of EmptyIterator

Method Detail

remove

public void remove()
Specified by:
remove in interface Iterator
See Also:
Iterator.remove()

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator
See Also:
Iterator.hasNext()

next

public Object next()
Specified by:
next in interface Iterator
See Also:
Iterator.next()


Copyright © 2003, 2004 - INRIA Rhone-Alpes - All Rights Reserved.