Add "alias" methods to compute zero-based offset for one and zero-based pagination #830
Labels
new feature
A new feature such as a new class, method, package, group of classes, etc.
Milestone
Add two new "alias" methods to
KiwiSearching
for ease of use and better API "ergonomics":zeroBasedOffsetForOneBasedPaging(int pageNumber, int pageSize)
- this is an alias of the originalzeroBasedOffset(int pageNumber, int pageSize)
zeroBasedOffsetForZeroBasedPaging(int pageNumber, int pageSize)
- this is a shorter way than calling thezeroBasedOffset
overload that accepts aPageNumberingScheme
I'm adding this only because I was working in a service recently that was using zero-based paging, and I had to call
zeroBasedOffset(pageNumber, PageNumberingScheme.ZERO_BASED, pageSize)
in various places. This was annoying, so why not just add shorthand methods with names that are clear?The text was updated successfully, but these errors were encountered: