T - The data typepublic class PageImpl<T> extends java.lang.Object implements Page<T>, java.io.Serializable
PageCURRENT_PAGE, DEFAULT_PAGE_SIZE, PAGE_COUNT, PAGE_ITEMS, PAGE_SIZE, TOTAL_COUNT| Constructor and Description |
|---|
PageImpl() |
PageImpl(java.util.List<T> pageItems,
int totalCount,
int pageSize,
int currentPage) |
| Modifier and Type | Method and Description |
|---|---|
static <T> Page<T> |
empty() |
int |
getCurrentPage()
Returns the number of this page within the total
|
int |
getPageCount()
Returns the total number of pages
|
java.util.List<T> |
getPageItems()
Returns the page items
|
int |
getPageSize()
Returns the page size
|
int |
getTotalCount()
Returns the total number of records
|
java.util.Iterator<T> |
iterator() |
void |
setCurrentPage(int currentPage) |
void |
setPageItems(java.util.List<T> pageItems) |
void |
setPageSize(int pageSize) |
void |
setTotalCount(int totalCount) |
java.lang.String |
toString() |
public PageImpl()
public PageImpl(java.util.List<T> pageItems, int totalCount, int pageSize, int currentPage)
public static <T> Page<T> empty()
public int getCurrentPage()
PagegetCurrentPage in interface Page<T>public int getPageCount()
PagegetPageCount in interface Page<T>public java.util.List<T> getPageItems()
PagegetPageItems in interface Page<T>public int getPageSize()
PagegetPageSize in interface Page<T>public int getTotalCount()
PagegetTotalCount in interface Page<T>public java.util.Iterator<T> iterator()
iterator in interface java.lang.Iterable<T>public void setCurrentPage(int currentPage)
public void setPageItems(java.util.List<T> pageItems)
public void setPageSize(int pageSize)
public void setTotalCount(int totalCount)
public java.lang.String toString()
toString in class java.lang.Object