public static < InnerT > PagedList < InnerT > convertToPagedList ( List < InnerT > list ) { PageImpl < InnerT > page = new PageImpl <> ( ) ; page . setItems ( list ) ; page . setNextPageLink ( null ) ; return new PagedList < InnerT > ( page ) { @ Override public Page < InnerT > nextPage ( String nextPageLink ) { return null ; } } ; }
Converts the List to PagedList .