PagingMapper

fun interface PagingMapper<T : Any, R : Any>

Author

skydoves (Jaewoong Eum)

Since

1.0.0

PagingMapper must be used in the PagingKeyConfig annotation, which maps the response type T to a list of R.

public class PokemonPagingMapper : PagingMapper<PokemonResponse, Pokemon> {

override fun map(value: PokemonResponse): List<Pokemon> {
return value.results
}
}

Functions

Link copied to clipboard
abstract fun map(value: T): List<R>