Skip to content

Instantly share code, notes, and snippets.

@alibahaaa
Created January 22, 2023 15:51
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 alibahaaa/c1d0c075947178d3d428cf2c82e74017 to your computer and use it in GitHub Desktop.
Save alibahaaa/c1d0c075947178d3d428cf2c82e74017 to your computer and use it in GitHub Desktop.
interface Target {
fun request()
}
class Adaptee {
fun specificRequest() {
// implementation
}
}
class Adapter(private val adaptee: Adaptee) : Target {
override fun request() {
adaptee.specificRequest()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment