博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
design pattern notes [1] - Bridge and composite
阅读量:5290 次
发布时间:2019-06-14

本文共 997 字,大约阅读时间需要 3 分钟。

Bridge pathern is used to decouple abstraction and implementation so that both can involve independently. This makes it easy to modify, extend and reuse abstraction and implementation independently.
Abstraction owns one reference of implementer. Client does not know which implementer it is handling. The implementer is transparent to it.
Bridge pathern is used to decouple abstraction and implementation so that both can involve independently.
Abstraction owns one reference of implementer.
One composite is one container which is composed of some leaves which have identical interfaces with the container. Both the container and its leaves(children) are inherited from component (abstract class). The container has a list (or something like), used to traverse its children. The child may owns reference to its parent (container)
One container is one kind of large leaf (component) which is composed of lightweight components.

转载于:https://www.cnblogs.com/hanhuilee/archive/2012/12/13/5221432.html

你可能感兴趣的文章
C++----练习--引用头文件
查看>>
11.基本包装类型
查看>>
ajax连接服务器框架
查看>>
wpf样式绑定 行为绑定 事件关联 路由事件实例
查看>>
利用maven管理项目之POM文件配置
查看>>
用HttpCombiner来减少js和css的请问次数
查看>>
FUSE-用户空间文件系统
查看>>
将tiff文件转化为jpg文件并保存
查看>>
ubuntu 16.04 开机脚本
查看>>
 VS2012 C#调用C++ dll
查看>>
TCL:表格(xls)中写入数据
查看>>
SQL SERVER 2005中如何获取日期(一个月的最后一日、一年的第一日等等)
查看>>
django 学习笔记(转)
查看>>
控制台程序秒变Windows服务(Topshelf)
查看>>
字节流与字符流的区别详解
查看>>
20141026--娱乐-箱子
查看>>
自定义分页
查看>>
Oracle事务
查看>>
任意输入10个int类型数据,把这10个数据首先按照排序输出,挑出这些数据里面的素数...
查看>>
String类中的equals方法总结(转载)
查看>>