/* Immutable generic version of the Iterator Interface SWE - 619 (Fall 2009) */ public interface ImmutableIterator { public boolean hasNext(); //Effects: Returns true if there are more elements to yield //else retruns false public E nextObject(); //Effects: If there are more results to yield, returns next result //otherwise, throws NoSuchElementException public ImmutableIterator nextIterator(); //Effects: If there are more results to yield, returns next ImmutableIterator //otherwise, throws NoSuchElementException }