|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 sizepublic PaginatedArrayList(java.util.Collection c, int pageSize)
c
- - the collection to build the instance withpageSize
- - the page sizeMethod Detail |
public int size()
size
in interface java.util.List
public boolean isEmpty()
isEmpty
in interface java.util.List
public boolean contains(java.lang.Object o)
contains
in interface java.util.List
public java.util.Iterator iterator()
iterator
in interface java.util.List
public java.lang.Object[] toArray()
toArray
in interface java.util.List
public java.lang.Object[] toArray(java.lang.Object[] a)
toArray
in interface java.util.List
public boolean containsAll(java.util.Collection c)
containsAll
in interface java.util.List
public java.lang.Object get(int index)
get
in interface java.util.List
public int indexOf(java.lang.Object o)
indexOf
in interface java.util.List
public int lastIndexOf(java.lang.Object o)
lastIndexOf
in interface java.util.List
public java.util.ListIterator listIterator()
listIterator
in interface java.util.List
public 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.List
public boolean add(java.lang.Object o)
add
in interface java.util.List
public boolean remove(java.lang.Object o)
remove
in interface java.util.List
public 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.List
public boolean removeAll(java.util.Collection c)
removeAll
in interface java.util.List
public boolean retainAll(java.util.Collection c)
retainAll
in interface java.util.List
public 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.List
public java.lang.Object remove(int index)
remove
in interface java.util.List
public int getPageSize()
PaginatedList
getPageSize
in interface PaginatedList
public boolean isFirstPage()
PaginatedList
isFirstPage
in interface PaginatedList
public boolean isMiddlePage()
PaginatedList
isMiddlePage
in interface PaginatedList
public boolean isLastPage()
PaginatedList
isLastPage
in interface PaginatedList
public boolean isNextPageAvailable()
PaginatedList
isNextPageAvailable
in interface PaginatedList
public boolean isPreviousPageAvailable()
PaginatedList
isPreviousPageAvailable
in interface PaginatedList
public boolean nextPage()
PaginatedList
nextPage
in interface PaginatedList
public boolean previousPage()
PaginatedList
previousPage
in interface PaginatedList
public void gotoPage(int pageNumber)
PaginatedList
gotoPage
in interface PaginatedList
pageNumber
- 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 |