Skip to content

Instantly share code, notes, and snippets.

@furkanakdemir
Created March 28, 2020 23:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save furkanakdemir/6b656f4ce06f8186a3506290e41c5068 to your computer and use it in GitHub Desktop.
Save furkanakdemir/6b656f4ce06f8186a3506290e41c5068 to your computer and use it in GitHub Desktop.
An interface to bidirectionally map domain and entity
interface Entity
interface Domain
interface LocalMapper<D : Domain, E : Entity> {
fun mapEntity(entity: E): Domain
fun mapDomain(domain: D): Entity
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment