org.wso2.carbon.utils
Class DataPaginator

java.lang.Object
  extended by org.wso2.carbon.utils.DataPaginator

public final class DataPaginator
extends Object

Utility class for handling data pagination


Method Summary
static
<C> List<C>
doPaging(int pageNumber, List<C> sourceList, Pageable pageable)
          A reusable generic method for doing item paging
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 items
pageable - The type of Pageable item
Returns:
Returned page


Copyright © 2014 WSO2 Inc. All rights reserved.