1 28 29 package com.idaremedia.antx.helpers; 30 31 import java.util.Enumeration ; 32 import java.util.NoSuchElementException ; 33 34 44 45 public class NothingIterator extends NoRemoveIteratorSkeleton 46 implements Enumeration 47 { 48 51 public static final NothingIterator INSTANCE= new NothingIterator(); 52 53 54 57 public NothingIterator() 58 { 59 } 60 61 62 63 67 public Object next() 68 { 69 throw new NoSuchElementException (); 70 } 71 72 73 77 public Object nextElement() 78 { 79 throw new NoSuchElementException (); 80 } 81 82 83 86 public boolean hasMoreElements() 87 { 88 return false; 89 } 90 91 92 95 public boolean hasNext() 96 { 97 return false; 98 } 99 } 100 101 102 | Popular Tags |