Interface PagedList<T>

  • Type Parameters:
    T - the type of elements in this list
    All Superinterfaces:
    Collection<T>, Iterable<T>, List<T>
    All Known Implementing Classes:
    PagedArrayList

    public interface PagedList<T>
    extends List<T>
    An extended version of a List which also provides access to the total size of the list.
    Since:
    1.0.0
    Author:
    Christian Beikov
    • Field Detail

      • EMPTY

        static final PagedList EMPTY
        An empty paged list.
        Since:
        1.2.0
    • Method Detail

      • getSize

        int getSize()
        Returns the actual size of this page.
        Returns:
        The actual size
        See Also:
        List.size()
      • getPage

        int getPage()
        Returns the number of this page, numbered from 1.
        Returns:
        The number of this page
      • getTotalPages

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

        int getFirstResult()
        Returns the position of the first result, numbered from 0. This is the position which was actually queried. This value might be different from KeysetPage.getFirstResult(). If this list was queried with an entity id which does not exist, this will return -1;
        Returns:
        The position of the first result or -1 if the queried entity id does not exist
      • getMaxResults

        int getMaxResults()
        Returns the maximum number of results. This is the maximum number which was actually queried. This value might be different from KeysetPage.getFirstResult().
        Returns:
        The maximum number of results