diff --git a/notes/pics/dp-bridge.png b/notes/pics/dp-bridge.png new file mode 100644 index 00000000..36909caf Binary files /dev/null and b/notes/pics/dp-bridge.png differ diff --git a/notes/设计模式 - 桥接.md b/notes/设计模式 - 桥接.md index 28965424..294f99de 100644 --- a/notes/设计模式 - 桥接.md +++ b/notes/设计模式 - 桥接.md @@ -2,19 +2,16 @@ ## 桥接(Bridge) -### Intent - +### 意图 将抽象与实现分离开来,使它们可以独立变化。 -### Class Diagram - +### 类图 - Abstraction:定义抽象类的接口 - Implementor:定义实现类接口 -

- -### Implementation +

+### 实现 RemoteControl 表示遥控器,指代 Abstraction。 TV 表示电视,指代 Implementor。 @@ -152,7 +149,11 @@ public class Client { } ``` -### JDK - +### JDK 中的应用 - AWT (It provides an abstraction layer which maps onto the native OS the windowing support.) - JDBC + +## 参考资料 + +- 弗里曼. Head First 设计模式 [M]. 中国电力出版社, 2007. +- Gamma E. 设计模式: 可复用面向对象软件的基础 [M]. 机械工业出版社, 2007.