1 16 package org.apache.myfaces.util; 17 18 import java.util.Enumeration ; 19 20 37 public final class NullEnumeration implements Enumeration  38 { 39 private static final NullEnumeration s_nullEnumeration = new NullEnumeration(); 40 41 public static final NullEnumeration instance() 42 { 43 return s_nullEnumeration; 44 } 45 46 public boolean hasMoreElements() 47 { 48 return false; 49 } 50 51 public Object nextElement() 52 { 53 throw new UnsupportedOperationException ("NullEnumeration has no elements"); 54 } 55 } 56 | Popular Tags |