Class MutableNavMapPager
-
- All Implemented Interfaces:
public class MutableNavMapPager<K, V> extends Pager<T>
-
-
Field Summary
Fields Modifier and Type Field Description public final NavigableMap<K, V>handle
-
Constructor Summary
Constructors Constructor Description MutableNavMapPager(NavigableMap<K, V> set, int pageSize)
-
Method Summary
Modifier and Type Method Description NavigableMap<K, V>getHandle()booleannextPage()跳转到下一页(如果存在) booleanprevPage()跳转到上一页(如果存在) booleangoToPage(int page)跳转到指定页 PageCursor<K>getCursor()获取当前游标 intgetCurrentPage()获取当前页码(从1开始) List<Map.Entry<K, V>>getCurrentPageElements()获取当前页的元素列表 booleanhasNextPage()检查是否存在下一页 booleanhasPrevPage()检查是否存在上一页 intgetTotalElements()获取总元素数 -
Methods inherited from class pers.neige.neigeitems.utils.pagination.Pager
firstPage, fromImmutableArray, fromImmutableList, fromImmutableMap, fromImmutableSet, fromMutableList, fromMutableNavMap, fromMutableNavSet, getPageSize, getTotalPages, lastPage -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
MutableNavMapPager
MutableNavMapPager(NavigableMap<K, V> set, int pageSize)
-
-
Method Detail
-
getHandle
@NonNull() NavigableMap<K, V> getHandle()
-
nextPage
boolean nextPage()
跳转到下一页(如果存在)
- Returns:
是否存在下一页
-
prevPage
boolean prevPage()
跳转到上一页(如果存在)
- Returns:
是否存在上一页
-
goToPage
boolean goToPage(int page)
跳转到指定页
- Parameters:
page- 目标页码(从1开始)- Returns:
页码是否有效
-
getCursor
PageCursor<K> getCursor()
获取当前游标
-
getCurrentPage
int getCurrentPage()
获取当前页码(从1开始)
-
getCurrentPageElements
@NonNull() List<Map.Entry<K, V>> getCurrentPageElements()
获取当前页的元素列表
-
hasNextPage
boolean hasNextPage()
检查是否存在下一页
-
hasPrevPage
boolean hasPrevPage()
检查是否存在上一页
-
getTotalElements
int getTotalElements()
获取总元素数
-
-
-
-