Class EnumerationSingle

  extended by org.tigris.gef.util.EnumerationSingle
All Implemented Interfaces:, java.util.Enumeration

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

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


public EnumerationSingle(java.lang.Object ele)
Method Detail


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


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