Skip to content

Files

Latest commit

70c5203 · Oct 19, 2018

History

History
This branch is up to date with jaredtao/DesignPattern:master.

Adapter_02

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Oct 9, 2018
Oct 19, 2018
Oct 9, 2018
Oct 9, 2018
Oct 9, 2018
Oct 9, 2018

对象的适配器模式

Painter为要适配的对象

Banner为适配者

PainterBanner是适配器。

适配器继承了Painter接口,内部聚合了一个Banner对象,利用Banner已有的功能 实现Painter的接口