public abstract class AbstractPageable<M> extends Object implements IPageable<M>
| 限定符和类型 | 字段和说明 |
|---|---|
protected List<M> |
data
该页数据
|
protected int |
pageNumber
当前第几页
|
protected int |
pageSize
每页记录数
|
protected int |
recordCount
总记录数
|
| 构造器和说明 |
|---|
AbstractPageable() |
AbstractPageable(List<M> data,
int pageSize,
int pageNumber,
int recordCount) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
add(int index,
M element) |
boolean |
add(M o) |
boolean |
addAll(Collection<? extends M> c) |
boolean |
addAll(int index,
Collection<? extends M> c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
protected int[] |
genNearPageNumbers(int count)
生成前后相邻的页码
|
M |
get(int index)
获取指定Bean
|
List<M> |
getData()
获取该页数据
|
int |
getFirstPageNumber()
获取第一页页码
|
int |
getLastPageNumber()
获取最后页页码
|
int[] |
getNearPageNumbers()
获取前后相邻的页码
|
int |
getNextPageNumber()
获取后一页页码
|
int |
getPageCount()
获取总页数
|
int |
getPageNumber()
获取该页页码
|
int |
getPageSize()
获取每页记录数
|
int |
getPreviousPageNumber()
获取前一页页码
|
int |
getRecordCount()
获取总记录数
|
int |
getSize()
获取该页数据条数
|
int |
indexOf(Object o) |
boolean |
isEmpty() |
boolean |
isHasNextPage()
是否有下一页
|
Iterator<M> |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator<M> |
listIterator() |
ListIterator<M> |
listIterator(int index) |
M |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
M |
set(int index,
M element) |
void |
setData(List<M> data)
设置该页数据
|
void |
setPageNumber(int pageNumber)
设置该页页码
|
void |
setPageSize(int pageSize)
设置每页记录数
|
void |
setRecordCount(int recordCount)
设置总记录数
|
int |
size() |
List<M> |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitequals, hashCode, replaceAll, sort, spliteratorparallelStream, removeIf, streamprotected int pageSize
protected int recordCount
protected int pageNumber
public int getPageSize()
IPageablegetPageSize 在接口中 IPageable<M>public void setPageSize(int pageSize)
pageSize - 每页记录数public int getRecordCount()
IPageablegetRecordCount 在接口中 IPageable<M>public void setRecordCount(int recordCount)
recordCount - 总记录数public int getPageCount()
IPageablegetPageCount 在接口中 IPageable<M>public int getPreviousPageNumber()
IPageablegetPreviousPageNumber 在接口中 IPageable<M>public int getNextPageNumber()
IPageablegetNextPageNumber 在接口中 IPageable<M>public boolean isHasNextPage()
IPageableisHasNextPage 在接口中 IPageable<M>public int getFirstPageNumber()
IPageablegetFirstPageNumber 在接口中 IPageable<M>public int getLastPageNumber()
IPageablegetLastPageNumber 在接口中 IPageable<M>public int getPageNumber()
IPageablegetPageNumber 在接口中 IPageable<M>public void setPageNumber(int pageNumber)
pageNumber - 页码protected int[] genNearPageNumbers(int count)
count - 页码个数public int[] getNearPageNumbers()
getNearPageNumbers 在接口中 IPageable<M>public boolean addAll(Collection<? extends M> c)
public boolean addAll(int index,
Collection<? extends M> c)
public boolean contains(Object o)
public boolean containsAll(Collection<?> c)
containsAll 在接口中 Collection<M>containsAll 在接口中 List<M>public int lastIndexOf(Object o)
lastIndexOf 在接口中 List<M>public ListIterator<M> listIterator()
listIterator 在接口中 List<M>public ListIterator<M> listIterator(int index)
listIterator 在接口中 List<M>public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
Copyright © 2023. All Rights Reserved.