Class PageRequestImpl

java.lang.Object
com.atlassian.bitbucket.util.PageRequestImpl
All Implemented Interfaces:
PageRequest

public class PageRequestImpl extends Object implements PageRequest
Default implementation of PageRequest.
  • Constructor Details

    • PageRequestImpl

      public PageRequestImpl(int start, int limit)
      Constructs a new PageRequestImpl for retrieving a page with limit entries from the specified start index.
      Parameters:
      start - the zero-based index of the first entry to include on the page
      limit - the maximum number of entries to include on the page
  • Method Details

    • getStart

      public int getStart()
      Specified by:
      getStart in interface PageRequest
      Returns:
      the index of the element in the result set that this page will start at
    • getLimit

      public int getLimit()
      Specified by:
      getLimit in interface PageRequest
      Returns:
      the maximum allowed size of the page
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • buildRestrictedPageRequest

      @Nonnull public PageRequest buildRestrictedPageRequest(int maxLimit)
      Specified by:
      buildRestrictedPageRequest in interface PageRequest
      Parameters:
      maxLimit - the maximum limit allowed in a page
      Returns:
      a copy of this pageRequest with the minimum of limit and maxLimit