|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.pebble.util.Pageable<T>
public class Pageable<T>
Helper class that implements paging over a collection.
Field Summary | |
---|---|
static int |
DEFAULT_PAGE_SIZE
the default page size |
Constructor Summary | |
---|---|
Pageable(java.util.List<T> list)
Creates a new instance with the specified list. |
Method Summary | |
---|---|
java.util.List<T> |
getList()
Gets the list that this instance is paging over. |
java.util.List<T> |
getListForPage()
Gets the subset of the list for the current page. |
int |
getMaxPageRange()
Gets the maximum page in the window. |
int |
getMaxPages()
Gets the maximum number of pages. |
int |
getMinPageRange()
Gets the minimum page in the window. |
int |
getNextPage()
Determines whether there is a next page and gets the page number. |
int |
getPage()
Gets the page. |
int |
getPageSize()
Gets the page size. |
int |
getPreviousPage()
Determines whether there is a previous page and gets the page number. |
void |
setPage(int p)
Sets the page size. |
void |
setPageSize(int pageSize)
Sets the page size. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_PAGE_SIZE
Constructor Detail |
---|
public Pageable(java.util.List<T> list)
list
- a ListMethod Detail |
---|
public java.util.List<T> getList()
public java.util.List<T> getListForPage()
public int getPageSize()
public void setPageSize(int pageSize)
pageSize
- the page size as an intpublic int getPage()
public void setPage(int p)
p
- the page as an intpublic int getMaxPages()
public int getPreviousPage()
public int getNextPage()
public int getMinPageRange()
public int getMaxPageRange()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |