本月博客排行
-
第1名
kaizi1992 -
第2名
wy_19921005 -
第3名
arpenker - hanbaohong
- jh108020
- silverend
年度博客排行
-
第1名
龙儿筝 -
第2名
宏天软件 -
第3名
青否云后端云 - wy_19921005
- benladeng5225
- vipbooks
- kaizi1992
- e_e
- arpenker
- tanling8334
- javashop
- sam123456gz
- zysnba
- fantaxy025025
- xiangjie88
- wallimn
- lemonhandsome
- ganxueyun
- Xeden
- zhanjia
- wangchen.ily
- xyuma
- jh108020
- johnsmith9th
- zxq_2017
- jbosscn
- forestqqqq
- ajinn
- daizj
- xpenxpen
- 喧嚣求静
- silverend
- kingwell.leng
- kristy_yy
- lchb139128
- jveqi
- lzyfn123
- java-007
- sunj
- yeluowuhen
- lerf
- xiaoxinye
- flashsing123
- chenqisdfx
- bosschen
- zhangjijun
- lyndon.lin
- sunnylocus
- paulwong
- lyj86
最新文章列表
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):代表参加组合的含有子对象的对象 ...