Skip to content

Instantly share code, notes, and snippets.

@dehidehidehi
Last active July 28, 2022 09:21
Show Gist options
  • Save dehidehidehi/bee1e7f4c0fa169811039583a5253d97 to your computer and use it in GitHub Desktop.
Save dehidehidehi/bee1e7f4c0fa169811039583a5253d97 to your computer and use it in GitHub Desktop.
Sample instantiation of a PageImpl instance.
/** Correct usage of a PageImpl which will return proper Pageable information. **/
private <T> PageImpl<T> asPageable(List<T> theList, Pageable page) {
return new PageImpl<>(theList, page, theList.size());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment