T - The element typepublic interface Page<T> extends Iterable<T>
Page.| Modifier and Type | Method and Description |
|---|---|
Pageable |
currentPageable()
|
List<T> |
getContent()
Returns the page content as Page.
|
int |
getNumber()
Returns the number of the current Page.
|
int |
getNumberOfElements()
Returns the actual number of elements currently on this Page.
|
int |
getSize()
Returns the size of the Page i.e. what was request via
Pageable.getPageSize(). |
Sort |
getSort()
Returns the sorting that was used for pagination.
|
long |
getTotalElements()
Returns the total amount of elements.
|
int |
getTotalPages()
Returns the number of total pages.
|
boolean |
hasContent()
Returns whether the Page has content at all.
|
boolean |
hasNext()
Returns if there is a next Page.
|
boolean |
hasPrevious()
Returns if there is a previous Page.
|
boolean |
isFirst()
Returns whether the current Page is the first one.
|
boolean |
isLast()
Returns whether the current Page is the last one.
|
Pageable |
nextPageable()
|
Pageable |
previousPageable()
|
forEach, iterator, spliteratorint getTotalPages()
long getTotalElements()
int getNumber()
int getSize()
Pageable.getPageSize().int getNumberOfElements()
boolean hasContent()
true if the content is non-empty, false otherwiseSort getSort()
boolean isFirst()
true if the getNumber() is 0, false otherwiseboolean isLast()
true if the getNumber() is getTotalPages() - 1, false otherwiseboolean hasNext()
true if the getNumber() is less than getTotalPages() - 1, false otherwiseboolean hasPrevious()
true if the getNumber() is greater than 0, false otherwisePageable nextPageable()
Copyright © 2014–2018 Blazebit. All rights reserved.