public class ListResultPager<T> extends Object implements ResultPager<T>
| Constructor and Description |
|---|
ListResultPager(Collection<? extends T> list) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
getEndIndex()
Get the index of the last object in the current page.
|
List<T> |
getList()
Get the list of objects in the current page.
|
int |
getNextPageNumber()
Get the page number of the next page.
|
int |
getNumPages()
Get the number of pages.
|
int |
getNumResults()
Get the total number of results returned.
|
int |
getPageNumber()
Get the page number of the current page.
|
int |
getPageSize()
Get the number of objects to display in a page.
|
int |
getPreviousPageNumber()
Get the page number of the previous page.
|
int |
getStartIndex()
Get the index of the first object in the current page.
|
boolean |
hasNextPage()
Check to see if there is a next page.
|
boolean |
hasPreviousPage()
Check to see if there is a previous page.
|
boolean |
isFirstPage()
Check to see if this is the first page.
|
boolean |
isLastPage()
Check to see if this is the last page.
|
void |
setPageNumber(int pageNumber)
Set the current page number.
|
void |
setPageNumberAndSize(int pageSize,
int pageNumber) |
void |
setPageSize(int pageSize)
Set the number of objects per page.
|
public ListResultPager(Collection<? extends T> list)
public void close()
close in interface ResultPager<T>close in interface AutoCloseablepublic int getEndIndex()
getEndIndex in interface ResultPager<T>public List<T> getList()
getList in interface ResultPager<T>public int getNextPageNumber()
getNextPageNumber in interface ResultPager<T>public int getNumPages()
getNumPages in interface ResultPager<T>public int getNumResults()
getNumResults in interface ResultPager<T>public int getPageNumber()
getPageNumber in interface ResultPager<T>public int getPageSize()
getPageSize in interface ResultPager<T>public int getPreviousPageNumber()
getPreviousPageNumber in interface ResultPager<T>public int getStartIndex()
getStartIndex in interface ResultPager<T>public boolean hasNextPage()
hasNextPage in interface ResultPager<T>public boolean hasPreviousPage()
hasPreviousPage in interface ResultPager<T>public boolean isFirstPage()
isFirstPage in interface ResultPager<T>public boolean isLastPage()
isLastPage in interface ResultPager<T>public void setPageNumber(int pageNumber)
setPageNumber in interface ResultPager<T>pageNumber - The current page number.public void setPageNumberAndSize(int pageSize,
int pageNumber)
setPageNumberAndSize in interface ResultPager<T>public void setPageSize(int pageSize)
setPageSize in interface ResultPager<T>pageSize - The number of objects per page.Copyright © 2015 Revolution Systems Inc.. All rights reserved.