CubeTwister 2.0alpha142 2012-02-11

ch.randelshofer.util
Class SingletonEnumeration

java.lang.Object
  extended by ch.randelshofer.util.SingletonEnumeration
All Implemented Interfaces:
java.util.Enumeration

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

The class that encapsulates one object into one element enumeration.

Version:
0.10, Apr 10, 1998
Author:
Jaroslav Tulach

Constructor Summary
SingletonEnumeration(java.lang.Object object)
           
 
Method Summary
 boolean hasMoreElements()
          Tests if this enumeration contains next element.
 java.lang.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(java.lang.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 java.util.Enumeration
Returns:
true if this enumeration contains it false otherwise.

nextElement

public java.lang.Object nextElement()
Returns the next element of this enumeration.

Specified by:
nextElement in interface java.util.Enumeration
Returns:
the next element of this enumeration.
Throws:
java.util.NoSuchElementException - if no more elements exist.

(c) Werner Randelshofer.
All rights reserved.