public class PageUtils
extends java.lang.Object
Page
creation and managementConstructor and Description |
---|
PageUtils() |
Modifier and Type | Method and Description |
---|---|
static <T> Page<T> |
createPage(int pageIndex,
int pageSize,
int totalItems,
int countPages)
This method generates a page object with the given parameters.
|
static <T> Page<T> |
createPage(int pageIndex,
int pageSize,
ResponseWrapper response)
This method generates a page object with the given parameters from a response object.
|
public static <T> Page<T> createPage(int pageIndex, int pageSize, int totalItems, int countPages)
pageIndex
- The index of the page (starting from 1)pageSize
- The size of the page (elements on each page)totalItems
- The total number of elements availablecountPages
- The number of pages availablepublic static <T> Page<T> createPage(int pageIndex, int pageSize, ResponseWrapper response)
pageIndex
- The index of the page (starting from 1)pageSize
- The size of the page (elements on each page)response
- The response from the webservice that is parsed for X-Items and X-Pages to generate the new pageCopyright © 2018. All Rights Reserved.