|
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 Slice. |
int |
getNumberOfElements()
Returns the number of elements currently on this Slice. |
int |
getSize()
Returns the size of the Slice. |
Sort |
getSort()
Returns the sorting parameters for the Slice. |
long |
getTotalElements()
Returns the total amount of elements. |
int |
getTotalPages()
Returns the number of total pages. |
boolean |
hasContent()
Returns whether the Slice has content at all. |
int |
hashCode()
|
boolean |
hasNext()
Returns if there is a next Slice. |
boolean |
hasNextPage()
Returns if there is a next page. |
boolean |
hasPrevious()
Returns if there is a previous Slice. |
boolean |
hasPreviousPage()
Returns if there is a previous page. |
boolean |
isFirst()
Returns whether the current Slice is the first one. |
boolean |
isFirstPage()
Returns whether the current page is the first one. |
boolean |
isLast()
Returns whether the current Slice is the last one. |
boolean |
isLastPage()
Returns whether the current page is the last one. |
Iterator<T> |
iterator()
|
Pageable |
nextPageable()
Returns the Pageable to request the next Slice. |
Pageable |
previousPageable()
Returns the Pageable to request the previous Slice. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.springframework.data.domain.Slice |
|---|
getContent, getNumber, getNumberOfElements, getSize, getSort, hasContent, hasPrevious, isFirst, nextPageable, previousPageable |
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| 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 getTotalPages()
Page
getTotalPages 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 hasNext()
SliceSlice.
hasNext in interface Slice<T>Slice.public boolean hasNextPage()
Page
hasNextPage in interface Page<T>public boolean isLast()
SliceSlice is the last one.
isLast in interface Slice<T>public boolean isLastPage()
Page
isLastPage in interface Page<T>public String toString()
toString in class Objectpublic boolean equals(Object obj)
public int hashCode()
public int getNumber()
SliceSlice. Is always non-negative.
getNumber in interface Slice<T>Slice.public int getSize()
SliceSlice.
getSize in interface Slice<T>Slice.public int getNumberOfElements()
SliceSlice.
getNumberOfElements in interface Slice<T>Slice.public boolean hasPrevious()
SliceSlice.
hasPrevious in interface Slice<T>Slice.public boolean isFirst()
SliceSlice is the first one.
isFirst in interface Slice<T>public Pageable nextPageable()
SlicePageable to request the next Slice. Can be null in case the current
Slice is already the last one. Clients should check Slice.hasNext() before calling this method to make
sure they receive a non-null value.
nextPageable in interface Slice<T>public Pageable previousPageable()
SlicePageable to request the previous Slice. Can be null in case the current
Slice is already the first one. Clients should check Slice.hasPrevious() before calling this method make
sure receive a non-null value.
previousPageable in interface Slice<T>public boolean hasContent()
SliceSlice has content at all.
hasContent in interface Slice<T>public List<T> getContent()
SliceList.
getContent in interface Slice<T>public Sort getSort()
SliceSlice.
getSort in interface Slice<T>public Iterator<T> iterator()
iterator in interface Iterable<T>
|
Spring Data Core | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||