Class Page<E>

  • All Implemented Interfaces:
    io.vertx.core.shareddata.Shareable

    public class Page<E>
    extends Object
    implements io.vertx.core.shareddata.Shareable

    Page class.

    Version:
    $Id: $Id
    Author:
    Long Dinh
    • Constructor Detail

      • Page

        public Page​(PageRequest pageRequest,
                    long totalElements,
                    List<E> content)

        Constructor for Page.

        Parameters:
        pageRequest - a PageRequest object.
        totalElements - a long.
        content - a List object.
      • Page

        public Page​(int currentPage,
                    int pageSize,
                    long totalElements,
                    List<E> content)

        Constructor for Page.

        Parameters:
        currentPage - a int.
        pageSize - a int.
        totalElements - a long.
        content - a List object.
      • Page

        public Page​(io.vertx.core.json.JsonObject jsonObject)

        Constructor for Page.

        Parameters:
        jsonObject - a JsonObject object.
    • Method Detail

      • toJson

        public io.vertx.core.json.JsonObject toJson()

        toJson.

        Returns:
        a JsonObject object.
      • map

        public <R> Page<R> map​(Function<E,​R> mapFn)

        map.

        Type Parameters:
        R - a R object.
        Parameters:
        mapFn - a Function object.
        Returns:
        a Page object.
      • getCurrentPage

        public int getCurrentPage()

        Getter for the field currentPage.

        Returns:
        a int.
      • getPageSize

        public int getPageSize()

        Getter for the field pageSize.

        Returns:
        a int.
      • getTotalPage

        public long getTotalPage()

        Getter for the field totalPage.

        Returns:
        a long.
      • getTotalElements

        public long getTotalElements()

        Getter for the field totalElements.

        Returns:
        a long.
      • getContent

        public List<E> getContent()

        Getter for the field content.

        Returns:
        a List object.