@Override public boolean hasNext() { if (next == null) { next = computeNext(); } return next != null; }
@Override public DiffEntry next() { if (next == null && !hasNext()) { throw new NoSuchElementException(); } DiffEntry returnValue = next; next = null; return returnValue; }
LocalCopyingDiffIterator changes = new LocalCopyingDiffIterator(diffIter, from, to);
LocalCopyingDiffIterator changes = new LocalCopyingDiffIterator(diffIter, from, to);
@Override public boolean hasNext() { if (next == null) { next = computeNext(); } return next != null; }
@Override public DiffEntry next() { if (next == null && !hasNext()) { throw new NoSuchElementException(); } DiffEntry returnValue = next; next = null; return returnValue; }