PageIterator

interface PageIterator<T>

Iterator which iterates over elements of type T in a paginated way. Elements are ordered in a most recent first manner i.e. each subsequent page will have older elements of type T.

Properties

Link copied to clipboard
abstract val hasNext: Boolean

True if there is a page after this page. False if this is the last page

Link copied to clipboard
abstract val hasPrevious: Boolean

True if there is a page before this page. False if this is the first page

Link copied to clipboard
abstract val items: List<T>

List of items of type T on the current page.

Link copied to clipboard
abstract val pageSize: Int

Number of items in the page.

Functions

Link copied to clipboard
abstract suspend fun next(): AxpResult<PageIterator<T>>

abstract fun next(responseHandler: ResponseHandler<PageIterator<T>>)

Returns the next page, if it exists

Link copied to clipboard
abstract suspend fun previous(): AxpResult<PageIterator<T>>

abstract fun previous(responseHandler: ResponseHandler<PageIterator<T>>)

Return the previous page, if it exists