本月博客排行
年度博客排行
-
第1名
青否云后端云 -
第2名
zw7534313 -
第3名
大家都说我很棒 - liyihz2008
- wy_19921005
- gengyun12
- hbxflihua
- e_e
- luxurioust
- dbagirl
- zysnba
- robotmen
- Alsmile
- gaozzsoft
- jywhltj
- cpongo1
- leslie26
- qepwqnp
- 解宜然
- cuityang
- sichunli_030
- gashero
- zhangdaiscott
- fantaxy025025
- vipbooks
- wallimn
- gdpglc
- ssydxa219
- ranbuijj
- javashop
- jickcai
- hanbaohong
- johnsmith9th
- appalese
- gaojingsong
- weiyides
- 淡看人生
- java-007
- zhangyi0618
- AVI
- laiyangdeli
- xpenxpen
- liunancun
- 龙哥IT
- conkeyn
- nychen2000
- lyndon.lin
- ouanui
- silverend
- jveqi
最新文章列表
DesignPattern: Composite Pattern
Composite Design Pattern
1) Motivation:
There are many times when a program need to manipulate a tree data structure and it is necessary to treat both Branches as well as Leaf Nodes uniform ...
设计模式学习笔记——组合模式
组合模式
又称合成模式,属于对象的结构模式,也被叫做部分-整体模式。
合成模式将对象组织到树结构中,使客户端将单纯元素和复合元素同等看待。
传统的盗图
合成模式主要涉及的3个角色:
1 抽象构件(Component):抽象角色,对参加组合的对象规定了统一接口
2 树叶构件(Leaf):代表参加组合的对象
3 树枝构件(Composite):代表参加组合的含有子对象的对象 ...