Interface Pageable
-
- All Known Subinterfaces:
KeysetPageable
- All Known Implementing Classes:
KeysetPageRequest,PageRequest
public interface PageableInterface containing pagination information, heavily inspired by Spring Data'sPageable.- Since:
- 1.2.0
- Author:
- Christian Beikov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Pageablefirst()intgetOffset()Returns the offset represented by the page number multiplied with the page size.intgetPageNumber()Returns the page to be returned.intgetPageSize()Returns the number of elements per page to be returned.SortgetSort()Returns the sorting that should be used for pagination.booleanhasPrevious()Returns whether there is a previous Pageable i.e. if the page number is greater than 0.Pageablenext()Pageableprevious()PageablepreviousOrFirst()
-
-
-
Method Detail
-
getPageNumber
int getPageNumber()
Returns the page to be returned. Zero based.- Returns:
- The page to be returned.
-
getPageSize
int getPageSize()
Returns the number of elements per page to be returned.- Returns:
- The number of elements per page
-
getOffset
int getOffset()
Returns the offset represented by the page number multiplied with the page size.- Returns:
- The offset
-
getSort
Sort getSort()
Returns the sorting that should be used for pagination.- Returns:
- The sorting
-
previous
Pageable previous()
-
previousOrFirst
Pageable previousOrFirst()
-
hasPrevious
boolean hasPrevious()
Returns whether there is a previous Pageable i.e. if the page number is greater than 0.- Returns:
- Whether there is a previous page
-
-