@Test void getEntriesSeenShouldReturnEmptyWhenNotConsumed() { ImmutableList<Integer> originalData = ImmutableList.of(1, 2, 3); IteratorWrapper<Integer> integerIteratorWrapper = new IteratorWrapper<>(originalData.iterator()); assertThat(integerIteratorWrapper.getEntriesSeen()).isEmpty(); }
public List<U> getEntriesSeen() { return ImmutableList.copyOf(entriesSeen); }
IteratorWrapper implements Iterator<U> { public List<U> getEntriesSeen() { return ImmutableList.copyOf(entriesSeen); } }
IteratorWrapper implements Iterator<U> { public List<U> getEntriesSeen() { return ImmutableList.copyOf(entriesSeen); } IteratorWrapper(Iterator<U> underlying); }
IteratorWrapper implements Iterator<U> { public List<U> getEntriesSeen() { return ImmutableList.copyOf(entriesSeen); } IteratorWrapper(Iterator<U> underlying); List<U> getEntriesSeen(); @Override boolean hasNext(); @Override U next(); @Override void remove(); }
IteratorWrapper implements Iterator<U> { public List<U> getEntriesSeen() { return ImmutableList.copyOf(entriesSeen); } IteratorWrapper(Iterator<U> underlying); List<U> getEntriesSeen(); @Override boolean hasNext(); @Override U next(); @Override void remove();  }