I'd Like a Two-argument Constructor for `PageImpl`
Closed this issue · 1 comments
Attacktive commented
I'm sorry if it's already been discussed.
We currently have two options:
I think it's common to want a constructor with List<T> content and Pageable pageable:
public PageImpl(List<T> content, Pageable pageable) {
this(content, pageable, CollectionUtils.isEmpty(content) ? 0 : content.size());
}I just gave my two cents.
mp911de commented
The path difference between a two-args and three-args constructor where inferring the size is minimal. Generally, a content list must not be null hence it is safe to always call the size method on your side. We don't have much usage for an additional constructor here and so we would rather not include such a change.