67

设计模式之适配器模式-zero-51CTO博客

 6 years ago
source link: http://blog.51cto.com/zero01/2065828
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
适配器模式(Adapter)是23种设计模式之一。DP中是这么定义外观模式的:适配器模式将一个类的接口转换成客户希望的另外一个接口。Adapter模式使得原本由于接口不兼容而不能在一起工作的那些类可以在一起工作。我们生活中就经常使用到适配器,适配器这个词最早应该是出现在电工学里。有些国家用110V电压,而我国使用的是220V电压,但我们的电器,例如手机、笔记本电脑、平板电脑等,是不能什么电压都能用

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK