01: // EmptyEnumeration.java
02: // $Id: EmptyEnumeration.java,v 1.3 2000/08/16 21:37:58 ylafon Exp $
03: // (c) COPYRIGHT MIT and INRIA, 1996.
04: // Please first read the full copyright statement in file COPYRIGHT.html
05:
06: package org.w3c.util;
07:
08: import java.util.Enumeration;
09: import java.util.NoSuchElementException;
10:
11: /**
12: * An empty enumeration.
13: */
14:
15: public class EmptyEnumeration implements Enumeration {
16:
17: public final boolean hasMoreElements() {
18: return false;
19: }
20:
21: public final Object nextElement() {
22: throw new NoSuchElementException("empty enumeration");
23: }
24:
25: }
|