org.openide.util.enum
Class SingletonEnumeration

java.lang.Object
  |
  +--org.openide.util.enum.SingletonEnumeration
All Implemented Interfaces:
Enumeration

public class SingletonEnumeration
extends Object
implements Enumeration

The class that encapsulates one object into one element enumeration.


Constructor Summary
SingletonEnumeration(Object object)
           
 
Method Summary
 boolean hasMoreElements()
          Tests if this enumeration contains next element.
 Object nextElement()
          Returns the next element of this enumeration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingletonEnumeration

public SingletonEnumeration(Object object)
Parameters:
object - object to be put into the enumeration
Method Detail

hasMoreElements

public boolean hasMoreElements()
Tests if this enumeration contains next element.
Specified by:
hasMoreElements in interface Enumeration
Returns:
true if this enumeration contains it false otherwise.

nextElement

public Object nextElement()
Returns the next element of this enumeration.
Specified by:
nextElement in interface Enumeration
Returns:
the next element of this enumeration.
Throws:
NoSuchElementException - if no more elements exist.


Built on December 12 2001.  |  Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.