com.ccg.util
Class EmptyEnumeration

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

public class EmptyEnumeration
extends Object
implements Enumeration

A Empty Enumeration object This class is used to create a enumeration which has no elements. It can be handy when you want to define a routine which returns an java.util.Enumeration object, but don't want to return null when you have no elements.

Version:
$Revision: 1.1.1.1 $
Author:
Paul Blankenbaker
See Also:
Enumeration

Constructor Summary
EmptyEnumeration()
          Constructor for the EmptyEnumeration class - doesn't need to do anything.
 
Method Summary
 boolean hasMoreElements()
          Determine if there are more elements.
 Object nextElement()
          Get next element in Enumeration (there never will be any) This returns the next item in the Enumeration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmptyEnumeration

public EmptyEnumeration()
Constructor for the EmptyEnumeration class - doesn't need to do anything.

Method Detail

hasMoreElements

public boolean hasMoreElements()
Determine if there are more elements. This routine indicates whether the Enumeration has more elements left in it to enumerate over. It will always return false.

Specified by:
hasMoreElements in interface Enumeration
Returns:
false - Enumeration never has elements.
See Also:
Enumeration

nextElement

public Object nextElement()
Get next element in Enumeration (there never will be any) This returns the next item in the Enumeration. This will ALWAYS be null for an empty enumeration.

Specified by:
nextElement in interface Enumeration
Returns:
Always returns null
See Also:
Enumeration


Copyright 1998-1998-2006 null. All Rights Reserved.