de.intarsys.tools.collection
Class EmptyEnumeration

java.lang.Object
  extended by de.intarsys.tools.collection.EmptyEnumeration
All Implemented Interfaces:
java.util.Enumeration

public class EmptyEnumeration
extends java.lang.Object
implements java.util.Enumeration

An Enumeration without elements.


Field Summary
static java.util.Enumeration UNIQUE
           
 
Constructor Summary
protected EmptyEnumeration()
          Create an emtpy enumeration
 
Method Summary
 boolean hasMoreElements()
          Return always false as an emtpy enumeration has no elements.
 java.lang.Object nextElement()
          Throw always exception, as an empty enumeration has no elements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNIQUE

public static final java.util.Enumeration UNIQUE
Constructor Detail

EmptyEnumeration

protected EmptyEnumeration()
Create an emtpy enumeration

Method Detail

hasMoreElements

public boolean hasMoreElements()
Return always false as an emtpy enumeration has no elements.

Specified by:
hasMoreElements in interface java.util.Enumeration
Returns:
Return always false as an emtpy enumeration has no elements.

nextElement

public java.lang.Object nextElement()
Throw always exception, as an empty enumeration has no elements.

Specified by:
nextElement in interface java.util.Enumeration
Returns:
never
Throws:
java.util.NoSuchElementException - Is thrown always