com.ibatis.common.util
Class PagedList

java.lang.Object
  extended by java.util.AbstractCollection
      extended by java.util.AbstractList
          extended by java.util.ArrayList
              extended by com.ibatis.common.util.PagedList
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

Deprecated. Use PaginatedArrayList - This class uses incorrect semantics and does not properly implement the new PaginatedList contract.

public class PagedList
extends java.util.ArrayList

Class to provide paged access to a list

Author:
Clinton Begin
See Also:
Serialized Form

Field Summary
private  int index
          Deprecated.  
private  int pageSize
          Deprecated.  
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
PagedList()
          Deprecated. Create a PagedList with the default page size
PagedList(java.util.Collection c, int pageSize)
          Deprecated. Create a PagedList with a preset page size from an existing collection
PagedList(int pageSize)
          Deprecated. Create a PagedList with a preset page size
PagedList(int initialCapacity, int pageSize)
          Deprecated. Create a PagedList with a preset page size and initial capacity
 
Method Summary
 java.util.Iterator getPageIterator()
          Deprecated. Gets an Iterator of a sub list that represents a page in the PagedList
 java.util.List getPageList()
          Deprecated. Gets a List that represents a page in the PagedList
 int getPageSize()
          Deprecated.  
 void gotoPage(int pageNumber)
          Deprecated. Go to a specific page number.
 boolean hasNextPage()
          Deprecated.  
 boolean hasPrevPage()
          Deprecated.  
 boolean isFirstPage()
          Deprecated. Is the current page the first page?
 boolean isLastPage()
          Deprecated. Is the current page the last page?
 boolean isMiddlePage()
          Deprecated. Is the current page a middle page? (i.e.
 void nextPage()
          Deprecated. Skip ahead to the next page in the collection
 void previousPage()
          Deprecated. Skip back to the previous page in the collection
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Field Detail

pageSize

private int pageSize
Deprecated. 

index

private int index
Deprecated. 
Constructor Detail

PagedList

public PagedList()
Deprecated. 
Create a PagedList with the default page size


PagedList

public PagedList(int pageSize)
Deprecated. 
Create a PagedList with a preset page size

Parameters:
pageSize - The size of the pages in the collection

PagedList

public PagedList(int initialCapacity,
                 int pageSize)
Deprecated. 
Create a PagedList with a preset page size and initial capacity

Parameters:
initialCapacity - The total size of the collection
pageSize - The size of the pages in the collection

PagedList

public PagedList(java.util.Collection c,
                 int pageSize)
Deprecated. 
Create a PagedList with a preset page size from an existing collection

Parameters:
pageSize - The size of the pages in the collection
c - The collection to start with
Method Detail

getPageIterator

public java.util.Iterator getPageIterator()
Deprecated. 
Gets an Iterator of a sub list that represents a page in the PagedList

Returns:
An Iterator with the elements on the current page

getPageList

public java.util.List getPageList()
Deprecated. 
Gets a List that represents a page in the PagedList

Returns:
A List with the elements on the current page

nextPage

public void nextPage()
Deprecated. 
Skip ahead to the next page in the collection


previousPage

public void previousPage()
Deprecated. 
Skip back to the previous page in the collection


isLastPage

public boolean isLastPage()
Deprecated. 
Is the current page the last page?

Returns:
True if the current page is the last page

isFirstPage

public boolean isFirstPage()
Deprecated. 
Is the current page the first page?

Returns:
True if the current page is the first page

isMiddlePage

public boolean isMiddlePage()
Deprecated. 
Is the current page a middle page? (i.e. not first or last)

Returns:
True if the current page is a middle page

getPageSize

public int getPageSize()
Deprecated. 
Returns:
The maximum number of items in a page.

hasNextPage

public boolean hasNextPage()
Deprecated. 
Returns:
True if a page exists after to the current page. Otherwise false.

hasPrevPage

public boolean hasPrevPage()
Deprecated. 
Returns:
True if a page exists previous to the current page. Otherwise false.

gotoPage

public void gotoPage(int pageNumber)
Deprecated. 
Go to a specific page number. Pages are zero based.

Parameters:
pageNumber -