1 38 39 package com.sun.xml.fastinfoset.util; 40 import java.util.Iterator ; 41 import com.sun.xml.fastinfoset.CommonResourceBundle; 42 43 44 public class EmptyIterator implements Iterator { 45 public static final EmptyIterator instance = new EmptyIterator(); 46 47 private EmptyIterator() { 48 } 49 public static EmptyIterator getInstance() { 50 return instance; 51 } 52 public boolean hasNext() { 53 return false; 54 } 55 public Object next() { 56 return null; 57 } 58 public void remove() { 59 throw new UnsupportedOperationException (CommonResourceBundle.getInstance().getString("message.emptyIterator")); 60 } 61 } 62 | Popular Tags |