What is the best way to initialize the Page?
Page<SomeKindOfList> lists = null
or is there a better way like for List
List<SomeKindOfList> thisIsAList = new ArrayList();
You can use PageImpl constructor
Creates a new PageImpl with the given content. This will result in the created Page being identical to the entire List.
For example:
List<String> list = Collections.emptyList(); Page<String> page = new PageImpl<>(list);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With