@Test(expected = NoSuchElementException.class) public void testNext() { final LazyIterator<String> iterator = newIterator(); assertEquals(iterator.next(), "1"); assertEquals(iterator.next(), "2"); newIteratorEmpty().next(); }
@Override public T next() { ensureIterator(); return iterator.next(); }
LazyIterator implements Iterator<T> { @Override public T next() { ensureIterator(); return iterator.next(); } }
LazyIterator implements Iterator<T> { @Override public T next() { ensureIterator(); return iterator.next(); } LazyIterator(Iterable<? extends T> iterable); }
LazyIterator implements Iterator<T> { @Override public T next() { ensureIterator(); return iterator.next(); } LazyIterator(Iterable<? extends T> iterable); @Override boolean hasNext(); @Override T next(); @Override void remove(); }
LazyIterator implements Iterator<T> { @Override public T next() { ensureIterator(); return iterator.next(); } LazyIterator(Iterable<? extends T> iterable); @Override boolean hasNext(); @Override T next(); @Override void remove();  }