Skip to content

Latest commit

 

History

History
3 lines (3 loc) · 281 Bytes

README.md

File metadata and controls

3 lines (3 loc) · 281 Bytes

AdapterModel

适配器模式,将一个类的接口转换成客户希望的另外一个接口,Adapter模式使得原本由于接口不兼容而不能一起工作的那些类可以一起工作。 那么何时使用适配器模式呢,一般在项目后期维护时,一些已有的不可更改或很难更改的类,需要使用其他的类的接口,那么就可以根据需求创建一个适配器。