Interface Page<T>

Type Parameters:
T -
All Known Implementing Classes:
DefaultPage

@PublicSpi public interface Page<T>
A page is a sublist of a sorted list of objects. It allows to gain information about the position of it in the list.
Since:
v9.0
  • Method Summary

    Modifier and Type
    Method
    Description
     
    default boolean
     
    boolean
    Indicates whether the Page is the first one.
    boolean
    Indicates whether the Page is the last one.
    default Page<T>
     
  • Method Details

    • isFirstPage

      boolean isFirstPage()
      Indicates whether the Page is the first one.
      Returns:
      true if the Page contains first elements of the list, false otherwise
    • isLastPage

      boolean isLastPage()
      Indicates whether the Page is the last one.
      Returns:
      true if the Page contains last elements of the list, false otherwise
    • getPageContents

      List<T> getPageContents()
      Returns:
      An immutable list of elements contained in the Page
    • reverse

      default Page<T> reverse()
      Returns:
      new instance of a Page with contents with reversed order
    • isEmpty

      default boolean isEmpty()