org.tigris.gef.util
Class EnumerationEmpty

java.lang.Object
  extended by org.tigris.gef.util.EnumerationEmpty
All Implemented Interfaces:
java.io.Serializable, java.util.Enumeration, java.util.Iterator

public class EnumerationEmpty
extends java.lang.Object
implements java.util.Enumeration, java.util.Iterator, java.io.Serializable

A enumeration that is always empty. Functially equivelant to: (new Vector()).elements(); This is useful when you must pass or return an enumeration, but you do not have any elements.

See Also:
Serialized Form

Field Summary
protected static EnumerationEmpty _theInstance
           
 
Constructor Summary
EnumerationEmpty()
           
 
Method Summary
 boolean hasMoreElements()
           
 boolean hasNext()
           
 java.lang.Object next()
           
 java.lang.Object nextElement()
           
 void remove()
           
static EnumerationEmpty theInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_theInstance

protected static EnumerationEmpty _theInstance
Constructor Detail

EnumerationEmpty

public EnumerationEmpty()
Method Detail

hasMoreElements

public boolean hasMoreElements()
Specified by:
hasMoreElements in interface java.util.Enumeration

nextElement

public java.lang.Object nextElement()
Specified by:
nextElement in interface java.util.Enumeration

theInstance

public static EnumerationEmpty theInstance()

hasNext

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

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator

remove

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