public abstract class ListPager<T> extends Object
You need to specify the page number you want to go to, the number of rows per page and the full list you want to page.
Constructor and Description |
---|
ListPager(List<T> fullList,
int pageNo,
int rowsPerPage)
Creates a ListPager that pages a list from a certain page number.
|
Modifier and Type | Method and Description |
---|---|
protected abstract String |
generatePageURL(int targetPageNo,
int rowsPerPage)
Each implementation of this class is expected to generate their own URLS based on the passed in page number
|
String |
getEndPageURL() |
int |
getFromIndex() |
int |
getFullListSize() |
List<T> |
getList() |
String |
getNextPageURL() |
int |
getPageNumber() |
String |
getPrevPageURL() |
int |
getRowsPerPage() |
String |
getStartPageURL() |
int |
getToIndex() |
boolean |
hasMultiplePages()
Returns true if the pager has multiple pages.
|
public ListPager(List<T> fullList, int pageNo, int rowsPerPage)
fullList
- is the full list of objectpageNo
- is a zero based indexrowsPerPage
- must be > 0public String getPrevPageURL()
generatePageURL(int, int)
to
generate an URLpublic String getNextPageURL()
generatePageURL(int, int)
to generate
an URLpublic String getStartPageURL()
public String getEndPageURL()
protected abstract String generatePageURL(int targetPageNo, int rowsPerPage)
targetPageNo
- the target page numberrowsPerPage
- the rows per pagepublic int getPageNumber()
public int getRowsPerPage()
public int getFullListSize()
public int getFromIndex()
public int getToIndex()
public boolean hasMultiplePages()
Copyright © 2002-2023 Atlassian. All Rights Reserved.