Interface Page<T>

Type Parameters:
T - type of the elements in the Page

public interface Page<T>
Represents a Page. A Page is a subset of a larget elements set.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <S> Page<S>
     
    static <S> Page<S>
    from(int ordinal, int totalPagesCount, int totalItemsCount, int maximumItemsPerPageCount, Sequence<S> items)
    Creates an instance from the provided source.
    Performs items.
    default <R> Page<R>
    map(Function<T,R> mapper)
    Performs map.
    int
    Performs maximumItemsPerPageCount.
    int
    Performs ordinal.
    int
    Returns total Items Count.
    int
    Returns total Pages Count.
  • Method Details

    • empty

      static <S> Page<S> empty()
      Returns:
      an empty Page.
    • from

      static <S> Page<S> from(int ordinal, int totalPagesCount, int totalItemsCount, int maximumItemsPerPageCount, Sequence<S> items)
      Creates an instance from the provided source.
      Parameters:
      ordinal - the ordinal value
      totalPagesCount - the totalPagesCount value
      totalItemsCount - the totalItemsCount value
      maximumItemsPerPageCount - the maximumItemsPerPageCount value
      items - the items value
      Returns:
      the result of from
    • ordinal

      int ordinal()
      Performs ordinal.
      Returns:
      the result of ordinal
    • totalPagesCount

      int totalPagesCount()
      Returns total Pages Count.
      Returns:
      the result of totalPagesCount
    • totalItemsCount

      int totalItemsCount()
      Returns total Items Count.
      Returns:
      the result of totalItemsCount
    • maximumItemsPerPageCount

      int maximumItemsPerPageCount()
      Performs maximumItemsPerPageCount.
      Returns:
      the result of maximumItemsPerPageCount
    • items

      Sequence<T> items()
      Performs items.
      Returns:
      the result of items
    • map

      default <R> Page<R> map(Function<T,R> mapper)
      Performs map.
      Parameters:
      mapper - the mapper value
      Returns:
      the result of map