Class PageResult<T>
java.lang.Object
tech.guilhermekaua.spigotboot.inventoryapi.pagination.source.PageResult<T>
Immutable outcome of one page load: the page's items plus the total number of elements in the
backing store, which drives
getTotalPages() and navigation clamping.-
Method Summary
-
Method Details
-
of
Creates a page result.- Type Parameters:
T- the element type- Parameters:
items- the page's items; copied defensively, must contain at most the requested page size (oversized results are truncated with a warning)totalElements- the total number of elements in the backing store- Returns:
- the immutable result
- Throws:
NullPointerException- ifitemsis nullIllegalArgumentException- iftotalElementsis negative
-