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>

public interface Slice<T> extends Streamable<T>
A slice of data that indicates whether there's a next or previous slice available.
  • Method Details

    • content

      List<T> content()
      Returns the page content as List.
      Returns:
      the page content as List; will never be null.
    • hasContent

      boolean hasContent()
      Returns whether the Slice 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 current Pageable
      Returns:
      the current Pageable; will never be null.
    • nextPageable

      Pageable nextPageable()
      Returns the next Pageable.next(), or null if it is known that there is no next page.
      Returns:
      the next pageable.