org.jikesrvm.util
Class EmptyEnumeration<E>

java.lang.Object
  extended by org.jikesrvm.util.EmptyEnumeration<E>
Type Parameters:
E - type parameter
All Implemented Interfaces:
Enumeration<E>

public final class EmptyEnumeration<E>
extends Object
implements Enumeration<E>

Implements an empty enumeration.

The Collections class from Java 7 provides an emptyEnumeration() method which will make this class unnecessary once we switch to Java 7.

TODO Remove this class when we require Java 7 for building and from our class libraries.


Field Summary
private static EmptyEnumeration<?> INSTANCE
           
 
Constructor Summary
private EmptyEnumeration()
          Non-instantiable.
 
Method Summary
static
<T> Enumeration<T>
emptyEnumeration()
           
 boolean hasMoreElements()
           
 E nextElement()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

private static final EmptyEnumeration<?> INSTANCE
Constructor Detail

EmptyEnumeration

private EmptyEnumeration()
Non-instantiable. Use emptyEnumeration() to create instances.

Method Detail

hasMoreElements

public boolean hasMoreElements()
Specified by:
hasMoreElements in interface Enumeration<E>

nextElement

public E nextElement()
Specified by:
nextElement in interface Enumeration<E>

emptyEnumeration

public static <T> Enumeration<T> emptyEnumeration()