| Modifier and Type | Field and Description |
|---|---|
static NoPage |
INSTANCE
Singleton instance.
|
DEFAULT_LIMIT, DEFAULT_OFFSET| Modifier and Type | Method and Description |
|---|---|
Page |
back()
Return the "previous"
Page, if possible. |
Page |
go(int page)
Jump to
page Page while keeping the same limit. |
int |
limit()
Return the maximum number of items on the page.
|
Page |
next()
Return the "next"
Page. |
int |
offset()
Return the number of items to "skip" (inclusive) before adding items to
the page.
|
Page |
resize(int size)
Set this
Page to include up to size items with the
assumption that all previous pages contained size items. |
Page |
size(int size)
Set this
Page to include up to size items. |
public static NoPage INSTANCE
public Page go(int page)
Pagepage Page while keeping the same limit.public int limit()
Pagelimit items remaining in the data set.public int offset()
Pagepublic Page resize(int size)
PagePage to include up to size items with the
assumption that all previous pages contained size items.
NOTE: This method recalculates all the items on the current page as if
all preceeding pages also had size items. If you want to modify
this page to include size without modifying the assumptions about
what was contained on previous pages, use the Page.size(int) method.
public Page size(int size)
PagePage to include up to size items.
NOTE: This method only modifies the current page size (e.g. adds/removes)
items instead of recalculating all the items on the current page as if
all preceding pages also had size items. If you want to modify
this page to include size items in a manner that assumes
preceding pages also contained size items, use the
Page.resize(int) method.