Package com.onwbp.adaptation

# Class RequestPagination.Page

java.lang.Object
com.onwbp.adaptation.RequestPagination.Page

Enclosing class:
  RequestPagination

public static final class RequestPagination.Page extends Object
Represents a page over a request.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<Adaptation>`
  `getRows()`
  Returns the rows of the current page, never `null`.
  `int`
  `getSize()`
  Returns the actual size of this page (the number of rows).
  `boolean`
  `hasNextPage()`
  Returns `false` if and only if we are on the last page.
  `boolean`
  `hasPreviousPage()`
  Returns `false` if and only if we are on the first page.
  `boolean`
  `isEmpty()`
  Returns whether this page is empty.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### getSize

    public int getSize()
    Returns the actual size of this page (the number of rows).
    See Also:
      - `RequestPagination.setPageSize(int)`

  - ### isEmpty

    public boolean isEmpty()
    Returns whether this page is empty.
    See Also:
      - `RequestPagination.setPageSize(int)`

  - ### getRows

    public List<Adaptation> getRows()
    Returns the rows of the current page, never `null`.

    The returned `List` is read only and has a size that is equal or less that the one specified by the method `RequestPagination.setPageSize(int)`.

  - ### hasPreviousPage

    public boolean hasPreviousPage()
    Returns `false` if and only if we are on the first page.

  - ### hasNextPage

    public boolean hasNextPage()
    Returns `false` if and only if we are on the last page.

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`