Class DataPaginator


  • public final class DataPaginator
    extends Object
    Utility class for handling data pagination
    • 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