com.atlassian.confluence.pages
Class ManualTotalPaginationSupport<T>
java.lang.Object
bucket.core.actions.PaginationSupport<T>
com.atlassian.confluence.pages.ManualTotalPaginationSupport<T>
- All Implemented Interfaces:
- PaginationSupport<T>
public class ManualTotalPaginationSupport<T>
- extends PaginationSupport<T>
This class allows us to set the total number of items without
reading the size of the items list. This means we don't have
to load all the items to determine the size.
Method Summary |
java.util.List<T> |
getPage()
Returns a subset of the list of items passed in, based on startIndex and the page size |
int |
getTotal()
Returns the total number of items in the list |
void |
setTotal(int total)
|
Methods inherited from class bucket.core.actions.PaginationSupport |
getCountOnEachPage, getEndIndex, getItems, getNextIndex, getNextStartIndex, getNextStartIndexes, getNiceEndIndex, getNiceStartIndex, getPageSize, getPreviousIndex, getPreviousStartIndex, getPreviousStartIndexes, getStartIndex, getStartIndexValue, setItems, setPageSize, setStartIndex |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ManualTotalPaginationSupport
public ManualTotalPaginationSupport()
ManualTotalPaginationSupport
public ManualTotalPaginationSupport(int pageSize)
ManualTotalPaginationSupport
public ManualTotalPaginationSupport(java.util.List<T> items,
int startIndex,
int total,
int pageSize)
getPage
public java.util.List<T> getPage()
- Description copied from class:
PaginationSupport
- Returns a subset of the list of items passed in, based on startIndex and the page size
- Specified by:
getPage
in interface PaginationSupport<T>
- Overrides:
getPage
in class PaginationSupport<T>
- Returns:
- a subset of the list of items passed in, based on startIndex and the page size
getTotal
public int getTotal()
- Description copied from interface:
PaginationSupport
- Returns the total number of items in the list
- Specified by:
getTotal
in interface PaginationSupport<T>
- Overrides:
getTotal
in class PaginationSupport<T>
- Returns:
- total number of items in the list
setTotal
public void setTotal(int total)
- Overrides:
setTotal
in class PaginationSupport<T>
Copyright © 2003-2013 Atlassian. All Rights Reserved.