Created
January 22, 2023 15:51
-
-
Save alibahaaa/c1d0c075947178d3d428cf2c82e74017 to your computer and use it in GitHub Desktop.
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
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