Skip to content

Commit

Permalink
implement workaround for BatchIterator interface change
Browse files Browse the repository at this point in the history
  • Loading branch information
xvrl committed Sep 18, 2023
1 parent b404563 commit 94c3b65
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@

public final class BatchIteratorAdapter implements BatchIterator
{
private final IntIterator iterator;
private final PeekableIteratorAdapter<IntIterator> iterator;

public BatchIteratorAdapter(IntIterator iterator)
{
this.iterator = Preconditions.checkNotNull(iterator, "iterator");
this.iterator = new PeekableIteratorAdapter<>(Preconditions.checkNotNull(iterator, "iterator"));
}

@Override
Expand All @@ -49,6 +49,12 @@ public boolean hasNext()
return iterator.hasNext();
}

@Override
public void advanceIfNeeded(int target)
{
iterator.advanceIfNeeded(target);
}

@Override
public BatchIterator clone()
{
Expand Down

0 comments on commit 94c3b65

Please sign in to comment.