public final class PageWrapper<I,P> extends Object implements io.apimatic.coreinterfaces.http.response.ApiResponseType<P>
| Modifier and Type | Method and Description |
|---|---|
static <I,P> PageWrapper<I,P> |
create(io.apimatic.coreinterfaces.http.response.Response response,
P page,
List<I> items,
PaginationStrategy strategy)
Create an instance of PageWrapper with provided page and meta data.
|
String |
getCursorInput()
Gets the cursor input used for cursor-based pagination.
|
io.apimatic.coreinterfaces.http.HttpHeaders |
getHeaders()
Headers of the http response.
|
List<I> |
getItems()
Content of the page.
|
String |
getNextLinkInput()
Gets the next link input used for link-based pagination.
|
int |
getOffsetInput()
Gets the offset input used for offset-based pagination.
|
int |
getPageInput()
Gets the page number input used for page-based pagination.
|
P |
getResult()
Content of the page.
|
int |
getStatusCode()
HTTP Status code of the api response.
|
boolean |
isCursorPagination() |
boolean |
isLinkPagination() |
boolean |
isNumberPagination() |
boolean |
isOffsetPagination() |
void |
setCursorInput(String cursorInput)
Sets the cursor input
|
void |
setNextLinkInput(String nextLinkInput)
Sets the next link input
|
void |
setOffsetInput(int offsetInput)
Sets the offset input
|
void |
setPageInput(int pageInput)
Sets the page input
|
public static <I,P> PageWrapper<I,P> create(io.apimatic.coreinterfaces.http.response.Response response, P page, List<I> items, PaginationStrategy strategy)
I - Represent type of items in the page.P - Represent type of page.response - Response from API call.page - Page to be wrapped.items - Extracted items from the page.strategy - Pagination strategy to be applied.public boolean isCursorPagination()
public boolean isLinkPagination()
public boolean isOffsetPagination()
public boolean isNumberPagination()
public void setNextLinkInput(String nextLinkInput)
nextLinkInput - value of next link inputpublic String getNextLinkInput()
public void setCursorInput(String cursorInput)
cursorInput - value of cursor inputpublic String getCursorInput()
public void setOffsetInput(int offsetInput)
offsetInput - value of offset inputpublic int getOffsetInput()
public void setPageInput(int pageInput)
pageInput - value of page inputpublic int getPageInput()
public int getStatusCode()
getStatusCode in interface io.apimatic.coreinterfaces.http.response.ApiResponseType<P>public io.apimatic.coreinterfaces.http.HttpHeaders getHeaders()
getHeaders in interface io.apimatic.coreinterfaces.http.response.ApiResponseType<P>public P getResult()
getResult in interface io.apimatic.coreinterfaces.http.response.ApiResponseType<P>Copyright © 2025. All rights reserved.