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 Link icon

    • content Link icon

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

      boolean hasContent()
      Returns whether the Slice has content at all.
      Returns:
      whether the Slice has content at all.
    • numberOfElements Link icon

      int numberOfElements()
      Returns the number of elements currently on this Slice.
      Returns:
      the number of elements currently on this Slice.
    • pageable Link icon

      Pageable pageable()
      Returns the current Pageable
      Returns:
      the current Pageable; will never be null.
    • nextPageable Link icon

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