@Test(expected = NoSuchElementException.class) public void empty_iteration_next_fails() { Iterator<Integer> iter = new ForwardIterator<>(Collections.emptyIterator()); iter.next(); }
@Override public T next() { next_ = next_.advance(); return next_.get(); }
ForwardIterator implements Iterator<T>, Cloneable { @Override public T next() { next_ = next_.advance(); return next_.get(); } }
ForwardIterator implements Iterator<T>, Cloneable { @Override public T next() { next_ = next_.advance(); return next_.get(); } ForwardIterator(Iterator<T> iter); private  ForwardIterator(Chain<T> next); }
ForwardIterator implements Iterator<T>, Cloneable { @Override public T next() { next_ = next_.advance(); return next_.get(); } ForwardIterator(Iterator<T> iter); private  ForwardIterator(Chain<T> next); @Override boolean hasNext(); @Override T next(); @Override ForwardIterator<T> clone(); }
ForwardIterator implements Iterator<T>, Cloneable { @Override public T next() { next_ = next_.advance(); return next_.get(); } ForwardIterator(Iterator<T> iter); private  ForwardIterator(Chain<T> next); @Override boolean hasNext(); @Override T next(); @Override ForwardIterator<T> clone();  }