Interface Page<T>

All Known Implementing Classes:
DefaultPage

public interface Page<T>
The model class of pagination
Since:
2.7.5
  • Method Summary

    Modifier and Type
    Method
    Description
    The data of current page
    default int
    The size of data
    int
    Gets the offset of request
    int
    Gets the size of request for pagination query
    int
    Get the number of total pages.
    int
    Gets the total amount of elements.
    default boolean
    Returns whether the page has data at all.
    boolean
    It indicates has next page or not
  • Method Details

    • getOffset

      int getOffset()
      Gets the offset of request
      Returns:
      positive integer
    • getPageSize

      int getPageSize()
      Gets the size of request for pagination query
      Returns:
      positive integer
    • getTotalSize

      int getTotalSize()
      Gets the total amount of elements.
      Returns:
      the total amount of elements
    • getTotalPages

      int getTotalPages()
      Get the number of total pages.
      Returns:
      the number of total pages.
    • getData

      List<T> getData()
      The data of current page
      Returns:
      non-null List
    • getDataSize

      default int getDataSize()
      The size of data
      Returns:
      positive integer
    • hasNext

      boolean hasNext()
      It indicates has next page or not
      Returns:
      if has , return true, or false
    • hasData

      default boolean hasData()
      Returns whether the page has data at all.
      Returns: