|
Spring Data Core | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.data.domain.PageImpl<T>
T - the type of which the page consists.public class PageImpl<T>
Basic Page implementation.
| Constructor Summary | |
|---|---|
PageImpl(List<T> content)
Creates a new PageImpl with the given content. |
|
PageImpl(List<T> content,
Pageable pageable,
long total)
Constructor of PageImpl. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
List<T> |
getContent()
Returns the page content as List. |
int |
getNumber()
Returns the number of the current page. |
int |
getNumberOfElements()
Returns the number of elements currently on this page. |
int |
getSize()
Returns the size of the page. |
Sort |
getSort()
Returns the sorting parameters for the page. |
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. |
int |
hashCode()
|
boolean |
hasNextPage()
Returns if there is a next page. |
boolean |
hasPreviousPage()
Returns if there is a previous page. |
boolean |
isFirstPage()
Returns whether the current page is the first one. |
boolean |
isLastPage()
Returns whether the current page is the last one. |
Iterator<T> |
iterator()
|
Pageable |
nextPageable()
Returns the Pageable to request the next Page. |
Pageable |
previousPageable()
Returns the Pageable to request the previous page. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PageImpl(List<T> content,
Pageable pageable,
long total)
PageImpl.
content - the content of this page, must not be null.pageable - the paging information, can be null.total - the total amount of items availablepublic PageImpl(List<T> content)
PageImpl with the given content. This will result in the created Page being identical
to the entire List.
content - must not be null.| Method Detail |
|---|
public int getNumber()
PagePage#getTotalPages().
getNumber in interface Page<T>public int getSize()
Page
getSize in interface Page<T>public int getTotalPages()
Page
getTotalPages in interface Page<T>public int getNumberOfElements()
Page
getNumberOfElements in interface Page<T>public long getTotalElements()
Page
getTotalElements in interface Page<T>public boolean hasPreviousPage()
Page
hasPreviousPage in interface Page<T>public boolean isFirstPage()
Page
isFirstPage in interface Page<T>public boolean hasNextPage()
Page
hasNextPage in interface Page<T>public boolean isLastPage()
Page
isLastPage in interface Page<T>public Pageable nextPageable()
PagePageable to request the next Page. Can be null in case the current
Page is already the last one. Clients should check Page.hasNextPage() before calling this method to
make sure they receive a non-null value.
nextPageable in interface Page<T>public Pageable previousPageable()
PagePageable to request the previous page. Can be null in case the current Page
is already the first one. Clients should check Page.hasPreviousPage() before calling this method make sure
receive a non-null value.
previousPageable in interface Page<T>public Iterator<T> iterator()
iterator in interface Iterable<T>iterator in interface Page<T>public List<T> getContent()
PageList.
getContent in interface Page<T>public boolean hasContent()
PagePage has content at all.
hasContent in interface Page<T>public Sort getSort()
Page
getSort in interface Page<T>public String toString()
toString in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
Spring Data Core | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||