Class PaginatedList<T>

java.lang.Object
com.easydesk.util.PaginatedList<T>
All Implemented Interfaces:
Iterable<T>

public class PaginatedList<T> extends Object implements Iterable<T>
Version:
$Id: PaginatedList.java,v 1.9 2008/10/07 09:17:40 youngho Exp $
Author:
Youngho Cho
  • Field Details

    • DEFAULT_NUMBER

      public static final int DEFAULT_NUMBER
      the default number which show in a single page TODO : use configure
      See Also:
  • Constructor Details

    • PaginatedList

      public PaginatedList()
      Constructor
    • PaginatedList

      public PaginatedList(List<T> l, int size, int pageNum, int perPage)
      Constructor which sets things up for a 'ready' list.
      Parameters:
      l -
      size - total size in the lists which includes in all pages
      pageNum -
      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

      public List<T> 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

      public void setList(List<T> list)
      Method to set the current list window.
    • isEmpty

      public boolean isEmpty()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • hasMorePages

      public boolean hasMorePages()
      Returns:
      boolean 보여줄 다음 쪽이 있는지
    • iterator

      public Iterator<T> iterator()
      DOCUMENT ME!
      Specified by:
      iterator in interface Iterable<T>
      Returns:
      DOCUMENT ME!