1 package uk.co.jezuk.mango.iterators; 2 3 7 public class NullIterator implements java.util.Iterator  8 { 9 10 public boolean hasNext() 11 { 12 return false; 13 } 15 public Object next() 16 { 17 throw new UnsupportedOperationException ("uk.co.jezuk.mango.NullIterator does not support the next method. In fact it's probably a logic error that you called it at all."); 18 } 20 public void remove() 21 { 22 throw new UnsupportedOperationException ("uk.co.jezuk.mango.NullIterator does not support the remove method. In fact it's probably a logic error that you called it at all."); 23 } } | Popular Tags |