org.displaytag.pagination
Class PaginationHelper
java.lang.Object
org.displaytag.pagination.PaginationHelper
public class PaginationHelper
- extends java.lang.Object
Class to help pagination when dealing with lists.
The class will attempt to use java.util.List.subList(int,int) to index into the list for the
appropriate page.
If the list does not contain enough elements to support the sub list, then the first pageSize elements
will be returned.
- Author:
- Kevin Conaway
|
Method Summary |
protected int |
getEnd(int listSize,
int start)
|
java.util.Iterator |
getIterator(java.util.List data)
|
java.util.Iterator |
getIterator(java.lang.Object data)
|
protected int |
getStart(int listSize)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PaginationHelper
public PaginationHelper(int pageNumber,
int pageSize)
getIterator
public java.util.Iterator getIterator(java.lang.Object data)
getIterator
public java.util.Iterator getIterator(java.util.List data)
getStart
protected int getStart(int listSize)
getEnd
protected int getEnd(int listSize,
int start)
Copyright © 2002-2010 the Displaytag team. All Rights Reserved.