Class PageOf<T>

  • Type Parameters:
    T - type of the result row
    All Implemented Interfaces:
    Iterable<T>

    public class PageOf<T>
    extends Object
    implements Iterable<T>
    Result object for potentially paginated content.
    • Constructor Detail

      • PageOf

        public PageOf​(@NotNull
                      @NotNull List<T> content,
                      int pageNumber,
                      int pageSize,
                      long totalCount)
      • PageOf

        public PageOf​(@NotNull
                      @NotNull List<T> content,
                      int pageNumber,
                      int pageSize)
      • PageOf

        public PageOf()
        Empty result.
      • PageOf

        public PageOf​(@NotNull
                      @NotNull List<T> content)
    • Method Detail

      • stream

        public Stream<T> stream()
      • content

        public List<T> content()
      • get

        public T get​(int index)
      • pageNumber

        public int pageNumber()
      • pageSize

        public int pageSize()
      • totalCount

        public long totalCount()
      • isEmpty

        public boolean isEmpty()
      • isPaginated

        public boolean isPaginated()
      • isKnownTotalCount

        public boolean isKnownTotalCount()