T - collection typepublic class SinglePagePagination<T> extends Object implements Pagination<T>
FIRST_PAGE, serialVersionUID| Constructor and Description |
|---|
SinglePagePagination(List<T> entirePage,
PaginationParameters paginationParameters,
int totalMatch)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
OptionalInt |
getFirstPage()
Gets the number of the first page if this is not the current page.
|
OptionalInt |
getLastPage()
Gets the number of the last page if this is not the current page.
|
OptionalInt |
getNextPage()
Gets next page if it exists.
|
int |
getNumResults()
Get the size of all the data.
|
int |
getPage()
Gets the number of the current page.
|
List<T> |
getPageOfData()
Get a list of results corresponding to the current page of data.
|
int |
getPerPage()
Gets the maximum size of a page.
|
OptionalInt |
getPreviousPage()
Gets previous page if it exists.
|
public SinglePagePagination(List<T> entirePage, PaginationParameters paginationParameters, int totalMatch)
entirePage - Collection of one page of datapaginationParameters - The parameters needed for paginationtotalMatch - The total number of results found. The single page collection is part of these resultspublic int getPage()
PaginationgetPage in interface Pagination<T>public int getPerPage()
PaginationgetPerPage in interface Pagination<T>public OptionalInt getFirstPage()
PaginationgetFirstPage in interface Pagination<T>public OptionalInt getLastPage()
PaginationgetLastPage in interface Pagination<T>public OptionalInt getNextPage()
PaginationgetNextPage in interface Pagination<T>public OptionalInt getPreviousPage()
PaginationgetPreviousPage in interface Pagination<T>public List<T> getPageOfData()
PaginationgetPageOfData in interface Pagination<T>public int getNumResults()
PaginationgetNumResults in interface Pagination<T>Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.