Interface PageUtil


  • public interface PageUtil
    Utility class for creating a Page object.
    • Method Summary

      Static Methods 
      Modifier and Type Method Description
      static <T> org.springframework.data.domain.Page<T> createPageFromList​(List<T> list, org.springframework.data.domain.Pageable pageable)
      Create a Page from a List of objects
    • Method Detail

      • createPageFromList

        static <T> org.springframework.data.domain.Page<T> createPageFromList​(List<T> list,
                                                                              org.springframework.data.domain.Pageable pageable)
        Create a Page from a List of objects
        Type Parameters:
        T - type of object
        Parameters:
        list - list of objects
        pageable - pagination information.
        Returns:
        page containing objects, and attributes set according to pageable
        Throws:
        IllegalArgumentException - - if list is null