Package com.atlassian.bitbucket.util
Class PageRequestImpl
java.lang.Object
com.atlassian.bitbucket.util.PageRequestImpl
- All Implemented Interfaces:
PageRequest
Default implementation of
PageRequest.-
Field Summary
Fields inherited from interface com.atlassian.bitbucket.util.PageRequest
MAX_PAGE_LIMIT -
Constructor Summary
ConstructorsConstructorDescriptionPageRequestImpl(int start, int limit) Constructs a newPageRequestImplfor retrieving a page withlimitentries from the specifiedstartindex. -
Method Summary
Modifier and TypeMethodDescriptionbuildRestrictedPageRequest(int maxLimit) booleanintgetLimit()intgetStart()inthashCode()toString()
-
Constructor Details
-
PageRequestImpl
public PageRequestImpl(int start, int limit) Constructs a newPageRequestImplfor retrieving a page withlimitentries from the specifiedstartindex.- Parameters:
start- the zero-based index of the first entry to include on the pagelimit- the maximum number of entries to include on the page
-
-
Method Details
-
getStart
public int getStart()- Specified by:
getStartin interfacePageRequest- Returns:
- the index of the element in the result set that this page will start at
-
getLimit
public int getLimit()- Specified by:
getLimitin interfacePageRequest- Returns:
- the maximum allowed size of the page
-
hashCode
public int hashCode() -
equals
-
toString
-
buildRestrictedPageRequest
- Specified by:
buildRestrictedPageRequestin interfacePageRequest- Parameters:
maxLimit- the maximum limit allowed in a page- Returns:
- a copy of this pageRequest with the minimum of limit and maxLimit
-