org.sadun.util
Class NullIterator

java.lang.Object
  extended byorg.sadun.util.NullIterator
All Implemented Interfaces:
java.util.Iterator

public class NullIterator
extends java.lang.Object
implements java.util.Iterator

An iterator which has no elements.

Version:
1.0
Author:
Cristiano Sadun

Constructor Summary
NullIterator()
           
 
Method Summary
 boolean hasNext()
          Always return false.
 java.lang.Object next()
          Always throws a NoSuchElementException.
 void remove()
          Not supported operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullIterator

public NullIterator()
Method Detail

hasNext

public boolean hasNext()
Always return false.

Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
Always throws a NoSuchElementException.

Specified by:
next in interface java.util.Iterator

remove

public void remove()
Not supported operation.

Specified by:
remove in interface java.util.Iterator