1 17 18 package org.apache.tomcat.util.collections; 19 20 import java.util.Enumeration ; 21 import java.util.NoSuchElementException ; 22 23 public class EmptyEnumeration implements Enumeration { 24 25 static EmptyEnumeration staticInstance=new EmptyEnumeration(); 26 27 public EmptyEnumeration() { 28 } 29 30 public static Enumeration getEmptyEnumeration() { 31 return staticInstance; 32 } 33 34 public Object nextElement( ) { 35 throw new NoSuchElementException ( "EmptyEnumeration"); 36 } 37 38 public boolean hasMoreElements() { 39 return false; 40 } 41 42 } 43 | Popular Tags |