定义:The Adapter Pattern converts the interface of a class into another interface the clients expect. Adapter lets
classes work together that couldn’t otherwise because of
incompatible interfaces
一句话:当两个类都已写好,需要一个东西把他们俩穿起来的时候,写一个转换器让他们俩连起来
类比:万能电源转接头
一句话:当两个类都已写好,需要一个东西把他们俩穿起来的时候,写一个转换器让他们俩连起来
类比:万能电源转接头