Last active
November 8, 2023 20:08
-
-
Save DenisBronx/eba8ed89bb7cadcf4a63827910d67d7c to your computer and use it in GitHub Desktop.
Repository Pattern ListMapper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Non-nullable to Non-nullable | |
interface ListMapper<I, O>: Mapper<List<I>, List<O>> | |
class ListMapperImpl<I, O>( | |
private val mapper: Mapper<I, O> | |
) : ListMapper<I, O> { | |
override fun map(input: List<I>): List<O> { | |
return input.map { mapper.map(it) } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment