Item - the paginated item typepublic class PaginatedView<Item> extends AbstractView<Item>
resultList, resultSize, resultViewOffset, resultViewSize| Constructor and Description |
|---|
PaginatedView(List<Item> items,
long pageSize,
long pageIndex)
Constructor.
|
PaginatedView(List<Item> subList,
long subListStart,
long realListSize,
long pageSize,
long pageIndex)
Constructor.
|
PaginatedView(Result<Item> result,
long pageSize,
long pageIndex)
Constructor.
|
PaginatedView(Result<Item> result,
Page page)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getPageIndex() |
long |
getPagesCount() |
long |
getPageSize() |
boolean |
hasNext()
Indicates whether the current page has a next page
|
boolean |
hasPrev()
Indicates whether the current page has a previous page.
|
Page |
next()
Returns the next page if it exists.
|
Page |
prev()
Returns the previous page if it exists.
|
getResultSize, getViewpublic PaginatedView(List<Item> items, long pageSize, long pageIndex)
items - the list of itempageSize - the number of item per pagepageIndex - the page indexpublic PaginatedView(Result<Item> result, long pageSize, long pageIndex)
result - the result containing the list of itempageSize - the number of item per pagepageIndex - the page indexpublic PaginatedView(Result<Item> result, Page page)
result - the result containing the list of itempage - the Pagepublic PaginatedView(List<Item> subList, long subListStart, long realListSize, long pageSize, long pageIndex)
subList - the sub list of itemsubListStart - the first item of the sub listrealListSize - the complete listpageSize - the number of item per pagepageIndex - the page indexpublic boolean hasNext()
public Page next()
public boolean hasPrev()
public Page prev()
public long getPageSize()
public long getPageIndex()
public long getPagesCount()
Copyright © 2013-2016–2016 SeedStack. All rights reserved.