Class DataPaginator

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

public final class DataPaginator extends Object
Utility class for handling data pagination
  • Method Details

    • 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