E - public class UnionResultPage<E> extends Object implements ResultPage<E>
ResultPageUtilResultPage.Foreach<E>, ResultPage.Reversable<E>, ResultPage.Sortable<E>| 限定符和类型 | 字段和说明 |
|---|---|
protected Comparator<E> |
m_Comparator
已过时。
用于比较结果项来确定返回位置
|
protected int |
m_Count
已过时。
总项数
|
protected int |
m_CurrentPage
已过时。
当前页
|
protected E[] |
m_Elements
已过时。
当前页的集合
|
protected int |
m_PageCount
已过时。
页数
|
protected int |
m_PagePos
已过时。
当前的分页结果集
|
protected List<ResultPage<E>> |
m_Pages
已过时。
多个分页结果集
|
protected int |
m_PageSize
已过时。
每页项数
|
protected int |
m_Position
已过时。
next位置
|
protected int |
m_Size
已过时。
当前页的项数
|
| 限定符 | 构造器和说明 |
|---|---|
protected |
UnionResultPage(List<ResultPage<E>> pages,
int count,
Comparator<E> comparator)
已过时。
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
已过时。
关闭
|
int |
getCount()
已过时。
总项数
|
int |
getPage()
已过时。
当前所处的结果页
|
int |
getPageCount()
已过时。
总页数
|
int |
getPageSize()
已过时。
取每页的项数
|
boolean |
gotoPage(int page)
已过时。
转到指定页(1-getPageCount())
|
boolean |
hasNext()
已过时。
|
boolean |
hasPrev()
已过时。
是否有前一项
|
Iterator<E> |
iterator()
已过时。
|
E |
move(int pos)
已过时。
移动到指定位置(相对于当前页)
|
E |
next()
已过时。
|
E |
prev()
已过时。
上一项(为支持上一项/下一项功能作扩展)
|
void |
remove()
已过时。
|
void |
setPage(int page)
已过时。
转到指定页(1-getPageCount())
|
void |
setPageSize(int size)
已过时。
设置每页项数
|
void |
sort(Comparator<E> c,
int limit)
已过时。
|
String |
toString()
已过时。
|
static <E> ResultPage<E> |
union(List<ResultPage<E>> pages,
Comparator<E> comparator)
已过时。
合并多个分页结果集合
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEachRemainingforEach, spliteratorprotected List<ResultPage<E>> m_Pages
protected int m_PagePos
protected Comparator<E> m_Comparator
protected int m_Count
protected int m_PageSize
protected int m_PageCount
protected int m_CurrentPage
protected E[] m_Elements
protected int m_Size
protected int m_Position
protected UnionResultPage(List<ResultPage<E>> pages, int count, Comparator<E> comparator)
public static <E> ResultPage<E> union(List<ResultPage<E>> pages, Comparator<E> comparator)
E - 集合项类型pages - 分页集comparator - 与页结果排序一致的比较器,为null则只是简单遍历每个页结果public int getCount()
ResultPagegetCount 在接口中 ResultPage<E>public int getPage()
ResultPagegetPage 在接口中 ResultPage<E>public int getPageCount()
ResultPagegetPageCount 在接口中 ResultPage<E>public int getPageSize()
ResultPagegetPageSize 在接口中 ResultPage<E>public boolean gotoPage(int page)
ResultPagegotoPage 在接口中 ResultPage<E>page - 第N页public boolean hasPrev()
ResultPagehasPrev 在接口中 ResultPage<E>public E move(int pos)
ResultPagemove 在接口中 ResultPage<E>pos - 在当前页的位置(0~getPageSize()-1)public E prev()
ResultPageprev 在接口中 ResultPage<E>public void setPageSize(int size)
ResultPagesetPageSize 在接口中 ResultPage<E>size - 每页项数public void sort(Comparator<E> c, int limit)
public void setPage(int page)
ResultPagesetPage 在接口中 ResultPage<E>page - 第N页public void close()
throws Exception
ResultPageclose 在接口中 ResultPage<E>close 在接口中 AutoCloseableExceptionCopyright © 2022. All rights reserved.