public boolean hasNext() { findNextElement(); return nextElement != null; }
public S next() { findNextElement(); S result = nextElement; if (result != null) { nextElement = null; nextCalled = true; return result; } else { throw new NoSuchElementException(); } }