1 38 39 40 package com.sun.xml.fastinfoset.util; 41 42 import java.util.Iterator ; 43 import com.sun.xml.fastinfoset.CommonResourceBundle; 44 45 public class ReadIterator implements Iterator { 46 47 Iterator iterator = EmptyIterator.getInstance(); 48 49 public ReadIterator(){ 50 } 51 52 public ReadIterator(Iterator iterator){ 53 if (iterator != null) { 54 this.iterator = iterator; 55 } 56 } 57 58 public boolean hasNext() { 59 return iterator.hasNext(); 60 } 61 62 public Object next() { 63 return iterator.next(); 64 } 65 66 public void remove() { 67 throw new UnsupportedOperationException (CommonResourceBundle.getInstance().getString("message.readonlyList")); 68 } 69 70 71 } 72 | Popular Tags |