bridge模式的作用就是将两样东西链接起来,它们分别是类的功能结构和类的是层次结构
类的功能层次结构:
父类具有基本功能
在子类新增功能 Display --> CountDisplay (类功能层次结构)
类的实现层次结构:
父类声明抽象方法来定义接口
子类通过实现具体方法来实现接口 DisplayImpl --> StringDisplayImpl (类的实现层次结构)