T
- the type of which the page consists.public class PageImpl<T> extends Object implements Page<T>, Serializable
Page
implementation.Constructor and Description |
---|
PageImpl(List<T> content)
Creates a new
PageImpl with the given content. |
PageImpl(List<T> content,
Pageable pageable,
long total)
Constructor of
PageImpl . |
Modifier and Type | Method and Description |
---|---|
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() |
String |
toString() |
public PageImpl(List<T> content, Pageable pageable, long total)
PageImpl
.content
- the content of this pagepageable
- the paging informationtotal
- the total amount of items availablepublic int getNumber()
Page
Page#getTotalPages()
.public int getSize()
Page
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 List<T> getContent()
Page
List
.getContent
in interface Page<T>
public boolean hasContent()
Page
Page
has content at all.hasContent
in interface Page<T>
public Sort getSort()
Page
Copyright © 2012. All Rights Reserved.