Interface Page<Entity>

Type Parameters:
Entity -
All Superinterfaces:
Iterable<Entity>
All Known Implementing Classes:
PageImpl

public interface Page<Entity> extends Iterable<Entity>
A page is a sub-list of a list of objects. It allows gain information about the position of it in the containing entire list.
  • Method Details

    • getPageNumber

      int getPageNumber()
      Returns the number of the current page. Is always non-negative.
      Returns:
      the number of the current page.
    • getItemsNumber

      int getItemsNumber()
      Returns the number of elements on the page.
      Returns:
      the number of elements on the page.
    • getTotalPages

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

      long getTotalItems()
      Returns the total amount of elements.
      Returns:
      the total amount of elements
    • hasNext

      boolean hasNext()
      Returns if there is a next page exists.
      Returns:
      true if there is a next page exists, otherwise false.
    • getContent

      List<Entity> getContent()
      Return container content.
      Returns:
      container content
    • hasContent

      boolean hasContent()
      Returns if there is a content exists.
      Returns:
      true if there is a content exists, otherwise false