Paginated Iterator
class PaginatedIterator<T>(pageSize: Int, countGetter: () -> Long, paginationResultGetter: Pagination.() -> PaginationResult<T>) : Iterator<T> (source)
An iterator that lazily fetches items from a paginated data source. It automatically fetches the next page when the current page is exhausted.
Parameters
page Size
The size of each page to fetch
count Getter
A function that returns the total count of available items
pagination Result Getter
A function that fetches a page of results for a given pagination
Type Parameters
T
The type of items being iterated
Constructors
Link copied to clipboard
constructor(pageSize: Int, countGetter: () -> Long, paginationResultGetter: Pagination.() -> PaginationResult<T>)