zh/patterns/adapter/ #117
Replies: 1 comment
-
|
The "real-world examples" section could be explained further, since a significant portion of the readers here are looking for a learning supplement in their spare time rather than reading the official documentation. Its strength lies in its engaging and intuitive nature, so it's crucial to maintain this focus rather than simply providing a link to the official documentation and ending there. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
zh/patterns/adapter/
又被称为 包装器 目的 将一个接口转换成另一个客户所期望的接口。适配器让那些本来因为接口不兼容的类可以合作无间。 解释 现实世界例子 考虑有这么一种情况,在你的存储卡中有一些照片,你想将其传到你的电脑中。为了传送数据,你需要某种能够兼容你电脑接口的适配器以便你的储存卡能连上你的电脑。在这种情况下,读卡器就是一个适配器。 另一个例子就是注明的电源适配器;...
https://java-design-patterns.com/zh/patterns/adapter/
Beta Was this translation helpful? Give feedback.
All reactions