Package com.ibatis.common.util
Class PaginatedArrayList
java.lang.Object
com.ibatis.common.util.PaginatedArrayList
- All Implemented Interfaces:
PaginatedList
,Iterable
,Collection
,List
Deprecated.
All paginated list features have been deprecated
Implementation of PaginatedList backed by an ArrayList.
-
Constructor Summary
ConstructorDescriptionPaginatedArrayList
(int pageSize) Deprecated.Instantiates a new paginated array list.PaginatedArrayList
(int initialCapacity, int pageSize) Deprecated.Constructor to set the initial size and the page size.PaginatedArrayList
(Collection c, int pageSize) Deprecated.Constructor to create an instance using an existing collection. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.boolean
Deprecated.boolean
addAll
(int index, Collection c) Deprecated.boolean
addAll
(Collection c) Deprecated.void
clear()
Deprecated.boolean
Deprecated.boolean
Deprecated.get
(int index) Deprecated.int
Deprecated.Returns the current page index, which is a zero based integer.int
Deprecated.Returns the maximum number of items per page.void
gotoPage
(int pageNumber) Deprecated.Moves to a specified page.int
Deprecated.boolean
isEmpty()
Deprecated.boolean
Deprecated.Is the current page the first page?.boolean
Deprecated.Is the current page the last page?.boolean
Deprecated.Is the current page a middle page (ie not first or last)?.boolean
Deprecated.Is a page available after the current page?.boolean
Deprecated.Is a page available before the current page?.iterator()
Deprecated.int
Deprecated.Deprecated.listIterator
(int index) Deprecated.boolean
nextPage()
Deprecated.Moves to the next page after the current page.boolean
Deprecated.Moves to the page before the current page.remove
(int index) Deprecated.boolean
Deprecated.boolean
Deprecated.boolean
Deprecated.Deprecated.int
size()
Deprecated.subList
(int fromIndex, int toIndex) Deprecated.Object[]
toArray()
Deprecated.Object[]
Deprecated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream
Methods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
Constructor Details
-
PaginatedArrayList
public PaginatedArrayList(int pageSize) Deprecated.Instantiates a new paginated array list.- Parameters:
pageSize
- the page size
-
PaginatedArrayList
public PaginatedArrayList(int initialCapacity, int pageSize) Deprecated.Constructor to set the initial size and the page size.- Parameters:
initialCapacity
- - the initial sizepageSize
- - the page size
-
PaginatedArrayList
Deprecated.Constructor to create an instance using an existing collection.- Parameters:
c
- - the collection to build the instance withpageSize
- - the page size
-
-
Method Details
-
size
public int size()Deprecated.- Specified by:
size
in interfaceCollection
- Specified by:
size
in interfaceList
-
isEmpty
public boolean isEmpty()Deprecated.- Specified by:
isEmpty
in interfaceCollection
- Specified by:
isEmpty
in interfaceList
-
contains
Deprecated.- Specified by:
contains
in interfaceCollection
- Specified by:
contains
in interfaceList
-
iterator
Deprecated. -
toArray
Deprecated.- Specified by:
toArray
in interfaceCollection
- Specified by:
toArray
in interfaceList
-
toArray
Deprecated.- Specified by:
toArray
in interfaceCollection
- Specified by:
toArray
in interfaceList
-
containsAll
Deprecated.- Specified by:
containsAll
in interfaceCollection
- Specified by:
containsAll
in interfaceList
-
get
Deprecated. -
indexOf
Deprecated. -
lastIndexOf
Deprecated.- Specified by:
lastIndexOf
in interfaceList
-
listIterator
Deprecated.- Specified by:
listIterator
in interfaceList
-
listIterator
Deprecated.- Specified by:
listIterator
in interfaceList
-
subList
Deprecated. -
add
Deprecated.- Specified by:
add
in interfaceCollection
- Specified by:
add
in interfaceList
-
remove
Deprecated.- Specified by:
remove
in interfaceCollection
- Specified by:
remove
in interfaceList
-
addAll
Deprecated.- Specified by:
addAll
in interfaceCollection
- Specified by:
addAll
in interfaceList
-
addAll
Deprecated. -
removeAll
Deprecated.- Specified by:
removeAll
in interfaceCollection
- Specified by:
removeAll
in interfaceList
-
retainAll
Deprecated.- Specified by:
retainAll
in interfaceCollection
- Specified by:
retainAll
in interfaceList
-
clear
public void clear()Deprecated.- Specified by:
clear
in interfaceCollection
- Specified by:
clear
in interfaceList
-
set
Deprecated. -
add
Deprecated. -
remove
Deprecated. -
getPageSize
public int getPageSize()Deprecated.Description copied from interface:PaginatedList
Returns the maximum number of items per page.- Specified by:
getPageSize
in interfacePaginatedList
- Returns:
- The maximum number of items per page.
-
isFirstPage
public boolean isFirstPage()Deprecated.Description copied from interface:PaginatedList
Is the current page the first page?.- Specified by:
isFirstPage
in interfacePaginatedList
- Returns:
- True if the current page is the first page or if only a single page exists.
-
isMiddlePage
public boolean isMiddlePage()Deprecated.Description copied from interface:PaginatedList
Is the current page a middle page (ie not first or last)?.- Specified by:
isMiddlePage
in interfacePaginatedList
- Returns:
- True if the current page is not the first or last page, and more than one page exists (always returns false if only a single page exists).
-
isLastPage
public boolean isLastPage()Deprecated.Description copied from interface:PaginatedList
Is the current page the last page?.- Specified by:
isLastPage
in interfacePaginatedList
- Returns:
- True if the current page is the last page or if only a single page exists.
-
isNextPageAvailable
public boolean isNextPageAvailable()Deprecated.Description copied from interface:PaginatedList
Is a page available after the current page?.- Specified by:
isNextPageAvailable
in interfacePaginatedList
- Returns:
- True if the next page is available
-
isPreviousPageAvailable
public boolean isPreviousPageAvailable()Deprecated.Description copied from interface:PaginatedList
Is a page available before the current page?.- Specified by:
isPreviousPageAvailable
in interfacePaginatedList
- Returns:
- True if the previous page is available
-
nextPage
public boolean nextPage()Deprecated.Description copied from interface:PaginatedList
Moves to the next page after the current page. If the current page is the last page, wrap to the first page.- Specified by:
nextPage
in interfacePaginatedList
- Returns:
- True if the page changed
-
previousPage
public boolean previousPage()Deprecated.Description copied from interface:PaginatedList
Moves to the page before the current page. If the current page is the first page, wrap to the last page.- Specified by:
previousPage
in interfacePaginatedList
- Returns:
- True if the page changed
-
gotoPage
public void gotoPage(int pageNumber) Deprecated.Description copied from interface:PaginatedList
Moves to a specified page. If the specified page is beyond the last page, wrap to the first page. If the specified page is before the first page, wrap to the last page.- Specified by:
gotoPage
in interfacePaginatedList
- Parameters:
pageNumber
- The page to go to
-
getPageIndex
public int getPageIndex()Deprecated.Description copied from interface:PaginatedList
Returns the current page index, which is a zero based integer. All paginated list implementations should know what index they are on, even if they don't know the ultimate boundaries (min/max).- Specified by:
getPageIndex
in interfacePaginatedList
- Returns:
- The current page
-