Package org.wso2.carbon.utils
Class DataPaginator
- java.lang.Object
-
- org.wso2.carbon.utils.DataPaginator
-
public final class DataPaginator extends Object
Utility class for handling data pagination
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <C> List<C>doPaging(int pageNumber, List<C> sourceList, Pageable pageable)A reusable generic method for doing item paging
-
-
-
Method Detail
-
doPaging
public static <C> List<C> doPaging(int pageNumber, List<C> sourceList, Pageable pageable)
A reusable generic method for doing item paging- Parameters:
pageNumber- The page required. Page number starts with 0.sourceList- The original list of itemspageable- The type of Pageable item- Returns:
- Returned page
-
-