public boolean hasNext() { findNextElement(); return nextElement != null; }
@Override 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(); } }
@Override public S next() { findNextElement(); S result = nextElement; if (result != null) { nextElement = null; nextCalled = true; return result; } else { throw new NoSuchElementException(); } }