1 package org.hibernate.util; 3 4 import java.util.Iterator ; 5 6 9 public final class EmptyIterator implements Iterator { 10 11 public static final Iterator INSTANCE = new EmptyIterator(); 12 13 public boolean hasNext() { 14 return false; 15 } 16 17 public Object next() { 18 throw new UnsupportedOperationException (); 19 } 20 21 public void remove() { 22 throw new UnsupportedOperationException (); 23 } 24 25 private EmptyIterator() {} 26 27 } 28 | Popular Tags |