Skip to content

Commit 2968a62

Browse files
committed
修改 Composite README
1 parent abe7d04 commit 2968a62

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

composite/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# 组合模式 ( Composite )
2+
3+
## 用途
4+
5+
> 将对象组合成树形结构以表示 “部分——整体” 的层次结构。
6+
>
7+
> Composite使得用户对单个对象和组合对象的使用具有一致性。
8+
9+
## 实例
10+
11+
> 在中文中,一句话是由词语组成的,而词语又由字组成;在英文中,句子由单词组成,而单词又由一个个字母组成。每个对象都可定义的它之前的或之后的内容。比如一个中文句子总是以句号结尾,一个英文单词之前通常是有空格的。
12+
13+
## 模式分析
14+
15+
>
16+
17+
## 适用场景

0 commit comments

Comments
 (0)