Iterator<T> () { return new Iterator<T>() { Iterator<? extends T> it = it1.iterator(); boolean firstFinished; { advance(); } @Override public boolean hasNext() { return !firstFinished || it.hasNext(); } @Override public T next() { T value = it.next(); // it.next() will throw NSEE if no elements remaining advance(); return value; } private void advance() { if (!firstFinished && !it.hasNext()) { it = it2.iterator(); firstFinished = true; } } }; }