Package com.easydesk.util
Class PaginatedList<T>
java.lang.Object
com.easydesk.util.PaginatedList<T>
- All Implemented Interfaces:
Iterable<T>
- Version:
- $Id: PaginatedList.java,v 1.9 2008/10/07 09:17:40 youngho Exp $
- Author:
- Youngho Cho
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intthe default number which show in a single page TODO : use configure -
Constructor Summary
ConstructorsConstructorDescriptionConstructorPaginatedList(List<T> l, int size, int pageNum, int perPage) Constructor which sets things up for a 'ready' list. -
Method Summary
Modifier and TypeMethodDescriptiongetList()Method to get the portion of the list that is currently viewable (inside the window)intMethod to return the next page number page number start 1intMethod to return the total number of pages in this list.intMethod to get the current page number.intMethod to return the previous page number. page number start from 1intMethod to get the number of results per page.intMethod to return the size of the entire list, not just the part that is currently 'to be' displayed.booleanbooleanisEmpty()DOCUMENT ME!iterator()DOCUMENT ME!voidsetCurrentPageNumber(int pageNum) Method to set the current page number.voidMethod to set the current list window.voidsetTotalListSize(int size) Method to set the TotalListSize.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
DEFAULT_NUMBER
public static final int DEFAULT_NUMBERthe default number which show in a single page TODO : use configure- See Also:
-
-
Constructor Details
-
PaginatedList
public PaginatedList()Constructor -
PaginatedList
Constructor which sets things up for a 'ready' list.- Parameters:
l-size- total size in the lists which includes in all pagespageNum-perPage-
-
-
Method Details
-
getTotalListSize
public int getTotalListSize()Method to return the size of the entire list, not just the part that is currently 'to be' displayed.- Returns:
- totalListSize
-
getNumberOfPages
public int getNumberOfPages()Method to return the total number of pages in this list.- Returns:
- nbrOfPages
-
getPageNumber
public int getPageNumber()Method to get the current page number.- Returns:
- current page number
-
getPrevPageNumber
public int getPrevPageNumber()Method to return the previous page number. page number start from 1- Returns:
- prev page number
-
getNextPageNumber
public int getNextPageNumber()Method to return the next page number page number start 1- Returns:
- next page number
-
getResultsPerPage
public int getResultsPerPage()Method to get the number of results per page.- Returns:
- results per page number
-
getList
Method to get the portion of the list that is currently viewable (inside the window) -
setTotalListSize
public void setTotalListSize(int size) Method to set the TotalListSize. -
setCurrentPageNumber
public void setCurrentPageNumber(int pageNum) Method to set the current page number. -
setList
Method to set the current list window. -
isEmpty
public boolean isEmpty()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
hasMorePages
public boolean hasMorePages()- Returns:
- boolean 보여줄 다음 쪽이 있는지
-
iterator
DOCUMENT ME!
-