All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.ru.astrainteractive.klibs.paging.context.IntPageContext.kt Maven / Gradle / Ivy

There is a newer version: 2.3.0
Show newest version
package ru.astrainteractive.klibs.paging.context

/**
 * This is default implementation for [Int] page context
 *
 * @param page is a number of current page
 */
data class IntPageContext(val page: Int) : PageContext {
    /**
     * This is default factory for generating other contexts from previous
     */
    object Factory : PageContext.Factory {
        /**
         * When next called we will simply increment page number
         */
        override fun next(pageContext: IntPageContext): IntPageContext {
            return pageContext.copy(page = pageContext.page + 1)
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy