Class MutableListPager

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final List<T> handle
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      List<T> getHandle()
      boolean nextPage() 跳转到下一页(如果存在)
      boolean prevPage() 跳转到上一页(如果存在)
      boolean goToPage(int page) 跳转到指定页
      int getCurrentPage() 获取当前页码(从1开始)
      List<T> getCurrentPageElements() 获取当前页的元素列表
      boolean hasNextPage() 检查是否存在下一页
      boolean hasPrevPage() 检查是否存在上一页
      int getTotalElements() 获取总元素数
      • 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

      • MutableListPager

        MutableListPager(List<T> handle, int pageSize)
    • Method Detail

      • nextPage

         boolean nextPage()

        跳转到下一页(如果存在)

        Returns:

        是否存在下一页

      • prevPage

         boolean prevPage()

        跳转到上一页(如果存在)

        Returns:

        是否存在上一页

      • goToPage

         boolean goToPage(int page)

        跳转到指定页

        Parameters:
        page - 目标页码(从1开始)
        Returns:

        页码是否有效

      • getCurrentPage

         int getCurrentPage()

        获取当前页码(从1开始)

      • hasNextPage

         boolean hasNextPage()

        检查是否存在下一页

      • hasPrevPage

         boolean hasPrevPage()

        检查是否存在上一页