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()
Pagination
getPage
in interface Pagination<T>
public int getPerPage()
Pagination
getPerPage
in interface Pagination<T>
public OptionalInt getFirstPage()
Pagination
getFirstPage
in interface Pagination<T>
public OptionalInt getLastPage()
Pagination
getLastPage
in interface Pagination<T>
public OptionalInt getNextPage()
Pagination
getNextPage
in interface Pagination<T>
public OptionalInt getPreviousPage()
Pagination
getPreviousPage
in interface Pagination<T>
public List<T> getPageOfData()
Pagination
getPageOfData
in interface Pagination<T>
public int getNumResults()
Pagination
getNumResults
in interface Pagination<T>
Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.