T
- The generic typepublic interface Page<T> extends Slice<T>
Page
and GORM's PagedResultList
, this models a type that supports
pagination operations.
A Page is a result set associated with a particular Pageable
that includes a calculation of the total
size of number of records.
Modifier and Type | Method and Description |
---|---|
static <T2> Page<T2> |
empty()
Creates an empty page object.
|
default int |
getTotalPages() |
long |
getTotalSize() |
default <T2> Page<T2> |
map(java.util.function.Function<T,T2> function)
Maps the content with the given function.
|
static <T> Page<T> |
of(java.util.List<T> content,
Pageable pageable,
long totalSize)
Creates a slice from the given content and pageable.
|
getContent, getNumberOfElements, getOffset, getPageable, getPageNumber, getSize, getSort, isEmpty, iterator, nextPageable, of, previousPageable
static final Page<?> EMPTY
long getTotalSize()
default int getTotalPages()
@Nonnull default <T2> Page<T2> map(java.util.function.Function<T,T2> function)
@NonNull static <T> Page<T> of(@NonNull java.util.List<T> content, @NonNull Pageable pageable, long totalSize)
T
- The generic typecontent
- The contentpageable
- The pageabletotalSize
- The total size@NonNull static <T2> Page<T2> empty()
T2
- The generic type