Class SimplePageRequest

  • All Implemented Interfaces:
    PageRequest

    public class SimplePageRequest
    extends Object
    implements PageRequest
    A simple immutable implementation of PageRequest
    • Constructor Detail

      • SimplePageRequest

        public SimplePageRequest​(LimitedRequest request)
      • SimplePageRequest

        public SimplePageRequest​(int start,
                                 int limit)
        Parameters:
        start - zero-based start index for the page of results (first result is 0)
        limit - the number of the results to return in the page
      • SimplePageRequest

        public SimplePageRequest​(Cursor cursor,
                                 int limit)
      • SimplePageRequest

        protected SimplePageRequest​(int start,
                                    Cursor cursor,
                                    int limit)
    • Method Detail

      • getLimit

        public int getLimit()
        Specified by:
        getLimit in interface PageRequest
        Returns:
        the number of the results to return in the page
      • getStart

        public int getStart()
        Specified by:
        getStart in interface PageRequest
        Returns:
        zero-based start index for the page of results (first result is 0)
      • getCursor

        public Cursor getCursor()
        Specified by:
        getCursor in interface PageRequest
        Returns:
        the identifier which is used to skip results from a previous query when paginating
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object