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.booleanReturns whether theSlicehas content at all.Returns the nextPageable.next(), ornullif it is known that there is no next page.intReturns the number of elements currently on this Slice.pageable()Returns the currentPageableMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods 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 theSlicehas content at all.- Returns:
- whether the
Slicehas 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(), ornullif it is known that there is no next page.- Returns:
- the next pageable.
-