1 24 25 package org.objectweb.dream.util; 26 27 import java.util.Iterator ; 28 import java.util.NoSuchElementException ; 29 30 36 public final class EmptyIterator implements Iterator  37 { 38 39 40 public static final EmptyIterator INSTANCE = new EmptyIterator(); 41 42 private EmptyIterator() 43 { 44 } 45 46 49 public void remove() 50 { 51 throw new IllegalStateException (); 52 } 53 54 57 public boolean hasNext() 58 { 59 return false; 60 } 61 62 65 public Object next() 66 { 67 throw new NoSuchElementException (); 68 } 69 70 } | Popular Tags |