klyn.data.Page.Page
constructor

    public Page(items as IList<T>, request as PageRequest, totalItems as Long):

Description

Creates an immutable page result.

Parameters

Parameter | Description
--- | ---
`items` | Current page rows.
`request` | Paging request.
`totalItems` | Exact complete result count.

Throws

- ValueException when `totalItems` is negative.

Example

    page = Page<Int>([1, 2], PageRequest(0, 2), 5)
    assert page.totalPages == 3