-
Notifications
You must be signed in to change notification settings - Fork 736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paginator #1730
base: main
Are you sure you want to change the base?
Paginator #1730
Conversation
Pending tasks:
Question for maintainers/reviewers:
Review comments on the overall design/implementation/behaviour of the methods are welcome, even though it is a WIP PR for now. |
I would assume that testing one scenario per implementation should generally be sufficient. You'll need to test search scenario separately.
Ideally, you should find scenarios where the underlying data doesn't change. However, if that isn't possible, once you record the test data you can mark the test as requiring custom data so that someone doesn't try to re-record it later without knowing the issues. If you go this path, be sure to add comments explaining how to update/re-record test data in future. |
* @return the paged iterable | ||
*/ | ||
public PagedIterable<T> withStartPage(int startPage) { | ||
this.startPage = startPage; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is going to be present on this class, we'll need to pass startPage
to the Iterator
as well.
I'm not sure I understand why we need a separate Overall I woud expect most of this to do via adding methods to existing classes, If you feel extremely strongly about this, I would even discuss pushing all the functionality of |
Description
paginator()
method inPagedIterable
to support starting at a particular page, and next, previous, first, last and jumping to any particular page, along with a few other supporting methods. Made in parallel toiterator()
method so as to keep backward compatibility, but supports all functionality thatiterator()
provides.Fixes #348
Fixes #1614
Fixes #448
Fixes #1197
Before submitting a PR:
@link
JavaDoc entries to the relevant documentation on https://docs.github.com/en/rest .mvn -D enable-ci clean install site
locally. If this command doesn't succeed, your change will not pass CI.main
. You will create your PR from that branch.When creating a PR: