1 16 17 package org.apache.log4j.helpers; 18 19 import java.util.Enumeration ; 20 import java.util.NoSuchElementException ; 21 22 29 public class NullEnumeration implements Enumeration { 30 private static final NullEnumeration instance = new NullEnumeration(); 31 32 private 33 NullEnumeration() { 34 } 35 36 public static NullEnumeration getInstance() { 37 return instance; 38 } 39 40 public 41 boolean hasMoreElements() { 42 return false; 43 } 44 45 public 46 Object nextElement() { 47 throw new NoSuchElementException (); 48 } 49 } 50 | Popular Tags |