DESY ACOP Beans Home

com.cosylab.util
Class EmptyEnumeration

java.lang.Object
  extended by com.cosylab.util.EmptyEnumeration
All Implemented Interfaces:
java.util.Enumeration

public final class EmptyEnumeration
extends java.lang.Object
implements java.util.Enumeration

This class defines enumeration with no elements. Its intended use is as return value when method returns enumeration that has no elements. This is a singleton implementation and instance of this class is obtained using EmptyEnumeration.getInstance() method.

This class should serve as a convenience implementation of an interface.

Version:
$id$
Author:
Ales Pucelj

Method Summary
static java.util.Enumeration getInstance()
          Returns singleton instance of this class.
 boolean hasMoreElements()
          Returns false.
 java.lang.Object nextElement()
          Returns null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static final java.util.Enumeration getInstance()
Returns singleton instance of this class.

Returns:
Instance of Enumeration.

hasMoreElements

public boolean hasMoreElements()
Returns false.

Specified by:
hasMoreElements in interface java.util.Enumeration
See Also:
Enumeration.hasMoreElements()

nextElement

public java.lang.Object nextElement()
Returns null.

Specified by:
nextElement in interface java.util.Enumeration
See Also:
Enumeration.nextElement()


Copyright © 2010. All Rights Reserved.