|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibatis.common.util.PaginatedArrayList
Implementation of PaginatedList backed by an ArrayList
| Constructor Summary | |
PaginatedArrayList(java.util.Collection c,
int pageSize)
Constructor to create an instance using an existing collection |
|
PaginatedArrayList(int pageSize)
|
|
PaginatedArrayList(int initialCapacity,
int pageSize)
Constructor to set the initial size and the page size |
|
| Method Summary | |
void |
add(int index,
java.lang.Object element)
|
boolean |
add(java.lang.Object o)
|
boolean |
addAll(java.util.Collection c)
|
boolean |
addAll(int index,
java.util.Collection c)
|
void |
clear()
|
boolean |
contains(java.lang.Object o)
|
boolean |
containsAll(java.util.Collection c)
|
java.lang.Object |
get(int index)
|
int |
getPageIndex()
Returns the current page index, which is a zero based integer. |
int |
getPageSize()
Returns the maximum number of items per page |
void |
gotoPage(int pageNumber)
Moves to a specified page. |
int |
indexOf(java.lang.Object o)
|
boolean |
isEmpty()
|
boolean |
isFirstPage()
Is the current page the first page? |
boolean |
isLastPage()
Is the current page the last page? |
boolean |
isMiddlePage()
Is the current page a middle page (ie not first or last)? |
boolean |
isNextPageAvailable()
Is a page available after the current page? |
boolean |
isPreviousPageAvailable()
Is a page available before the current page? |
java.util.Iterator |
iterator()
|
int |
lastIndexOf(java.lang.Object o)
|
java.util.ListIterator |
listIterator()
|
java.util.ListIterator |
listIterator(int index)
|
boolean |
nextPage()
Moves to the next page after the current page. |
boolean |
previousPage()
Moves to the page before the current page. |
java.lang.Object |
remove(int index)
|
boolean |
remove(java.lang.Object o)
|
boolean |
removeAll(java.util.Collection c)
|
boolean |
retainAll(java.util.Collection c)
|
java.lang.Object |
set(int index,
java.lang.Object element)
|
int |
size()
|
java.util.List |
subList(int fromIndex,
int toIndex)
|
java.lang.Object[] |
toArray()
|
java.lang.Object[] |
toArray(java.lang.Object[] a)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.List |
equals, hashCode |
| Constructor Detail |
public PaginatedArrayList(int pageSize)
pageSize -
public PaginatedArrayList(int initialCapacity,
int pageSize)
initialCapacity - - the initial sizepageSize - - the page size
public PaginatedArrayList(java.util.Collection c,
int pageSize)
c - - the collection to build the instance withpageSize - - the page size| Method Detail |
public int size()
size in interface java.util.Listpublic boolean isEmpty()
isEmpty in interface java.util.Listpublic boolean contains(java.lang.Object o)
contains in interface java.util.Listpublic java.util.Iterator iterator()
iterator in interface java.util.Listpublic java.lang.Object[] toArray()
toArray in interface java.util.Listpublic java.lang.Object[] toArray(java.lang.Object[] a)
toArray in interface java.util.Listpublic boolean containsAll(java.util.Collection c)
containsAll in interface java.util.Listpublic java.lang.Object get(int index)
get in interface java.util.Listpublic int indexOf(java.lang.Object o)
indexOf in interface java.util.Listpublic int lastIndexOf(java.lang.Object o)
lastIndexOf in interface java.util.Listpublic java.util.ListIterator listIterator()
listIterator in interface java.util.Listpublic java.util.ListIterator listIterator(int index)
listIterator in interface java.util.List
public java.util.List subList(int fromIndex,
int toIndex)
subList in interface java.util.Listpublic boolean add(java.lang.Object o)
add in interface java.util.Listpublic boolean remove(java.lang.Object o)
remove in interface java.util.Listpublic boolean addAll(java.util.Collection c)
addAll in interface java.util.List
public boolean addAll(int index,
java.util.Collection c)
addAll in interface java.util.Listpublic boolean removeAll(java.util.Collection c)
removeAll in interface java.util.Listpublic boolean retainAll(java.util.Collection c)
retainAll in interface java.util.Listpublic void clear()
clear in interface java.util.List
public java.lang.Object set(int index,
java.lang.Object element)
set in interface java.util.List
public void add(int index,
java.lang.Object element)
add in interface java.util.Listpublic java.lang.Object remove(int index)
remove in interface java.util.Listpublic int getPageSize()
PaginatedList
getPageSize in interface PaginatedListpublic boolean isFirstPage()
PaginatedList
isFirstPage in interface PaginatedListpublic boolean isMiddlePage()
PaginatedList
isMiddlePage in interface PaginatedListpublic boolean isLastPage()
PaginatedList
isLastPage in interface PaginatedListpublic boolean isNextPageAvailable()
PaginatedList
isNextPageAvailable in interface PaginatedListpublic boolean isPreviousPageAvailable()
PaginatedList
isPreviousPageAvailable in interface PaginatedListpublic boolean nextPage()
PaginatedList
nextPage in interface PaginatedListpublic boolean previousPage()
PaginatedList
previousPage in interface PaginatedListpublic void gotoPage(int pageNumber)
PaginatedList
gotoPage in interface PaginatedListpageNumber - The page to go topublic int getPageIndex()
PaginatedList
getPageIndex in interface PaginatedList
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||