org.tigris.gef.util
Class EnumerationSingle

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

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

A enumeration that has exactly one element. Functially equivelant to: Vector v = new Vector(); v.addElement(obj); return v.elements(); This is useful when you must pass or return an enumeration, but you do not have many elements.

See Also:
Serialized Form

Constructor Summary
EnumerationSingle(java.lang.Object ele)
           
 
Method Summary
 boolean hasMoreElements()
           
 java.lang.Object nextElement()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumerationSingle

public EnumerationSingle(java.lang.Object ele)
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