Interface Pagination<T>

    • Method Detail

      • getItems

        List<T> getItems()
        Gets the items listed on the page
      • getFirst

        Page getFirst()
        Gets the first page
        Returns:
      • getPrevious

        Page getPrevious()
        Gets the previous page
        Returns:
        the previous page if there is any. Otherwise returns null.
      • getCurrent

        Page getCurrent()
        Gets the current page
        Returns:
      • getNext

        Page getNext()
        Gets the next page
        Returns:
        the next page if there is any. Otherwise returns null.
      • getLast

        Page getLast()
        Gets the last page
        Returns:
      • getSize

        int getSize()
        Gets the size of items which are listed on the page.
        Returns:
      • getLimit

        int getLimit()
        Gets the number of pages which are shown on the pagination
        Returns:
      • getTotal

        long getTotal()
        Total number of results
        Returns:
      • isEnabled

        boolean isEnabled()
        Whether pagination is enabled
        Returns:
        true if the pagination is enabled
      • getOffset

        int getOffset()
        Gets the offset with respect to the current page number.
        Returns:
        calculates and returns the start offset. If the calculated value is greater or equal to total number of results, returns 0.
      • getPages

        List<Page> getPages()
        Returns pages with respect to the limit
        Returns:
        List containing page numbers