org.jikesrvm.util
Class EmptyEnumeration<E>
java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
private static final EmptyEnumeration<?> INSTANCE
EmptyEnumeration
private EmptyEnumeration()
- Non-instantiable. Use
emptyEnumeration()
to
create instances.
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()