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
ConstructorDescriptionPageRequestImpl
(int start, int limit) Constructs a newPageRequestImpl
for retrieving a page withlimit
entries from the specifiedstart
index. -
Method Summary
Modifier and TypeMethodDescriptionbuildRestrictedPageRequest
(int maxLimit) boolean
int
getLimit()
int
getStart()
int
hashCode()
toString()
-
Constructor Details
-
PageRequestImpl
public PageRequestImpl(int start, int limit) Constructs a newPageRequestImpl
for retrieving a page withlimit
entries from the specifiedstart
index.- 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:
getStart
in interfacePageRequest
- Returns:
- the index of the element in the result set that this page will start at
-
getLimit
public int getLimit()- Specified by:
getLimit
in interfacePageRequest
- Returns:
- the maximum allowed size of the page
-
hashCode
public int hashCode() -
equals
-
toString
-
buildRestrictedPageRequest
- Specified by:
buildRestrictedPageRequest
in interfacePageRequest
- Parameters:
maxLimit
- the maximum limit allowed in a page- Returns:
- a copy of this pageRequest with the minimum of limit and maxLimit
-