Package com.atlassian.jira.util
Class StreamPageRequestsImpl
java.lang.Object
com.atlassian.jira.util.StreamPageRequestsImpl
- All Implemented Interfaces:
StreamPageRequests
- Since:
- 10.7.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlimit(StreamPageRequest pageRequest, int maxSize) Takes a page request and if itslimitis greater thanmaxSizethen returns a new page request withlimitequal tomaxSize.Creates an instance ofStreamPageRequest.
-
Constructor Details
-
StreamPageRequestsImpl
public StreamPageRequestsImpl()
-
-
Method Details
-
request
Creates an instance ofStreamPageRequest.cursor is the value of the last element in the previous page, or null if this is the first page.
- Specified by:
requestin interfaceStreamPageRequests- Parameters:
cursor- the value of the last element in the previous page, or null if this is the first pagelimit- maximum number of results on a page, will be set toStreamPageRequest.MAX_PAGE_LIMITifnull- Returns:
- a page request object
-
limit
Takes a page request and if itslimitis greater thanmaxSizethen returns a new page request withlimitequal tomaxSize. Otherwise the same page request is returned.- Specified by:
limitin interfaceStreamPageRequests- Parameters:
pageRequest- original page requestmaxSize- maximum limit in page request- Returns:
- page request with limit no greater than maxSize
-