T - object type listed in pagejava.lang.Iterable<T>PageResponseImplpublic interface PageResponse<T>
extends java.lang.Iterable<T>
| Modifier and Type | Method | Description |
|---|---|---|
java.util.List<T> |
getContent() |
|
int |
getNumber() |
Returns the number of the current
PageResponse. |
int |
getNumberOfElements() |
Returns the number of elements currently on this
PageResponse. |
PageRequest |
getPageRequest() |
|
int |
getSize() |
Returns the size of the
PageResponse. |
Sorting |
getSorting() |
|
long |
getTotalElements() |
Returns the total amount of elements.
|
int |
getTotalPages() |
Returns the number of total pages.
|
boolean |
hasContent() |
Returns whether the
PageResponse has content at all. |
boolean |
hasNext() |
Returns if there is a next
PageResponse. |
boolean |
hasPrevious() |
Returns if there is a previous
PageResponse. |
boolean |
isFirst() |
Returns whether the current
PageResponse is the first one. |
boolean |
isLast() |
Returns whether the current
PageResponse is the last one. |
PageRequest |
nextPageRequest() |
Returns the
PageRequest to request the next PageResponse. |
PageRequest |
previousPageRequest() |
Returns the
PageRequest to request the previous PageResponse. |
void |
setContent(java.util.List<T> content) |
Allows to set the content (needed in case of content has to be converted/casted)
|
java.util.List<T> getContent()
List.void setContent(java.util.List<T> content)
content - list of content/objects of this pageint getNumber()
PageResponse. Is always non-negative.PageResponse.int getNumberOfElements()
PageResponse.PageResponse.PageRequest getPageRequest()
int getSize()
PageResponse.PageResponse.Sorting getSorting()
PageResponse.long getTotalElements()
int getTotalPages()
boolean hasContent()
PageResponse has content at all.PageResponse has content at all.boolean hasNext()
PageResponse.PageResponse.boolean hasPrevious()
PageResponse.PageResponse.boolean isFirst()
PageResponse is the first one.PageResponse is the first one.boolean isLast()
PageResponse is the last one.PageResponse is the last one.PageRequest nextPageRequest()
PageRequest to request the next PageResponse. Can be null in case the current
PageResponse is already the last one. Clients should check hasNext() before calling this method to make
sure they receive a non-null value.PageRequest to request the next PageResponsePageRequest previousPageRequest()
PageRequest to request the previous PageResponse. Can be null in case the current
PageResponse is already the first one. Clients should check hasPrevious() before calling this method make
sure receive a non-null value.PageRequest to request the previous PageResponseCopyright © 2018. All rights reserved.