class AbstractIterator2 implements Iterator<E> {

	@Override
	public E next() {
		if (finished) {
			throw new NoSuchElementException("No (more) elements");
		}
		if (!ready) {
			next = getNext();
			if (finished) {
				throw new NoSuchElementException("No (more) elements");
			}
		}
		ready = false;
		return next;
	}

}