@Test public void testRemove() { List<String> list = new ArrayList<String>(Arrays.asList("a", "b", "c")); IndexedIterator<String> iterator = new IndexedIterator<String>(list.iterator()); iterator.next(); iterator.next(); iterator.remove(); assertThat(list, is(Arrays.asList("a", "c"))); }
@Override public void remove() { iterator.remove(); }
IndexedIterator implements Iterator<T> { @Override public void remove() { iterator.remove(); } }
IndexedIterator implements Iterator<T> { @Override public void remove() { iterator.remove(); } IndexedIterator(Iterator<? extends T> iterator);  IndexedIterator(int start, int step, Iterator<? extends T> iterator); }
IndexedIterator implements Iterator<T> { @Override public void remove() { iterator.remove(); } IndexedIterator(Iterator<? extends T> iterator);  IndexedIterator(int start, int step, Iterator<? extends T> iterator); int getIndex(); @Override boolean hasNext(); @Override T next(); @Override void remove(); }
IndexedIterator implements Iterator<T> { @Override public void remove() { iterator.remove(); } IndexedIterator(Iterator<? extends T> iterator);  IndexedIterator(int start, int step, Iterator<? extends T> iterator); int getIndex(); @Override boolean hasNext(); @Override T next(); @Override void remove();  }