com.myjavatools.lib.foundation
Class Iterators.EmptyIterator<T>

java.lang.Object
  extended by com.myjavatools.lib.foundation.Iterators.EmptyIterator<T>
All Implemented Interfaces:
java.util.Iterator<T>
Enclosing class:
Iterators

public static class Iterators.EmptyIterator<T>
extends java.lang.Object
implements java.util.Iterator<T>

EmptyIterator is a helper class that does not contain any elements and throws an exception when next() is called. The exception message can be customized.


Constructor Summary
Iterators.EmptyIterator()
           
Iterators.EmptyIterator(java.lang.String message)
           
 
Method Summary
 boolean hasNext()
           
 T next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Iterators.EmptyIterator

public Iterators.EmptyIterator(java.lang.String message)

Iterators.EmptyIterator

public Iterators.EmptyIterator()
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<T>

next

public T next()
Specified by:
next in interface java.util.Iterator<T>

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<T>