Package jakarta.data.page
Interface Slice<T>
- Type Parameters:
T
- the type of elements in this slice
- All Superinterfaces:
Iterable<T>
,Streamable<T>
- All Known Subinterfaces:
KeysetAwarePage<T>
,KeysetAwareSlice<T>
,Page<T>
A slice of data that indicates whether there's a next or previous slice available.
-
Method Summary
Modifier and TypeMethodDescriptioncontent()
Returns the page content asList
.boolean
Returns whether theSlice
has content at all.Returns the nextPageable.next()
, ornull
if it is known that there is no next page.int
Returns the number of elements currently on this Slice.pageable()
Returns the currentPageable
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface jakarta.data.Streamable
stream
-
Method Details
-
content
Returns the page content asList
.- Returns:
- the page content as
List
; will never be null.
-
hasContent
boolean hasContent()Returns whether theSlice
has content at all.- Returns:
- whether the
Slice
has content at all.
-
numberOfElements
int numberOfElements()Returns the number of elements currently on this Slice.- Returns:
- the number of elements currently on this Slice.
-
pageable
Pageable pageable()Returns the currentPageable
- Returns:
- the current Pageable; will never be null.
-
nextPageable
Pageable nextPageable()Returns the nextPageable.next()
, ornull
if it is known that there is no next page.- Returns:
- the next pageable.
-