<commit_before>1ۼ
http://www.cnblogs.com/olvo/archive/2012/05/03/2481014.html
http://justsee.iteye.com/blog/808799

DesignPattern1

UMLĹ3֣ 

(1) 4֣ṹΪע
(2) ϵ4֣ϵʵֹϵϵϵ
(3) ͼ10֣ͼͼͼͼͼͼ״̬ͼͼͼЭͼ

ֹϵ
UML , ӿ, ӿӿĹϵ: (generalization) ϵ, (association)ϵ( , ۺ, ), (dependency)ϵʵ(realization)ϵ. 

ǶģߴԵĳɷֵĳ󣻹ϵһͼۼص

<1> (generalization)
һࣨΪࡢӽӿڣ̳һࣨΪࡢӿڣĹܣԼ¹̳߽ܵӿӿ֮Ĺϵ
1̳
ָһࣨΪࡢӽӿڣ̳һࣨΪࡢӿڣĹܣԼ¹̳߽ܵӿӿ֮ĹϵJavaдϵͨؼextendsȷʶʱһû顣
ʶ ʵ + Ǽͷ

</1>
<2>ʵ(realization)ϵ
1ʵ
ָһclassʵinterfaceӿڣǶĹܣʵӿ֮ĹϵJavaдϵͨؼimplementsȷʶ
ʶ  + Ǽͷ
</2>
<3>
1(dependency)ϵ
Լ򵥵⣬һAʹõһBϵǵģʹùϵǾżȻԵġʱԵġǳģBı仯Ӱ쵽AĳҪӣҪһʱ봬֮Ĺϵڴ棬ΪBΪAĳmethodʹã 
java . ϵΪ: ֲ, еĲ, ͶԾ̬ĵ.
ʶ  + ͼͷ
2(association)ϵ: 
ʹõͷʾ, ʹ˫ͷʹüͷʾ˫,ʹ˫. ˵, ÿ˵һ,ʾмʵ. 
ʾ֮,ʹһ֪һԺͷֵࡢӿ֮弶һǿϵҺҵѣֹϵǿϵżȻԡϵҲʱԵģһǳԵģ˫Ĺϵһƽȵġǵ˫ģڴ棬ΪBԵʽڹAУҲǹAһΪBȫֱ 
ʶ ʵ + ͼͷ
3ۺ(aggregation)ϵ
ǹϵһֵ벿֡ӵеĹϵhas-aĹϵʱ벿֮ǿɷģǿԾиԵڣֿڶҲΪCPU˾ԱĹϵȣڴ棬͹ϵһµģֻܴ弶֣ 
ۺϹϵҲʹʵʵֵ. java ﷨Ƿֲ;ۺϵ. 
ϵǴͬĲ, ۺϹϵǴڲƽȵĲ, һʾ, һʾ.
ʶ
4(ϳ)ϵ(composition): Ҳǹϵһֵһcontains-aĹϵֹϵȾۺϸǿҲΪǿۺϣͬ벿ּĹϵʱ벿ǲɷֵģڽҲζŲֵڽĴԣϳɹϵܹ. ڴ棬͹ϵһµģֻܴ弶, Person "Brain
ϸۺϼͬΨһǡ֡롰塱ڣ˵ ֡ڲܱȡ塱Ҫ

ۺϡֹϵֵࡢӿڼáϵǱȽֵģкܶĹϵҪ׼λǺѵģ⼸ֹϵ弶ģص֣ԴӴ沢ȫָֹϵܵ˵ֹϵֵǿ̶Ϊ>ۺ>>

ֹϵ
1ۺϸʵڹ ֻĹ Ϊͬ ֮֮
ͨȻȣ
ϲֺ¹¶ һֱȺӵ Ⱥ ÿһֻ㶼ԼȺ ÿȺкö ȺֹϵͿԳ֮Ϊۺ ÿֻ㶼ֻ Ĺϵͽ д˿ɼ ۺϵĹϵûϽ 㲻ΪǵȺȺɢ޷ ޷桪Ϲϵͬ
2<commit_msg>designpattern<commit_after>1ۼ
http://www.cnblogs.com/olvo/archive/2012/05/03/2481014.html
http://justsee.iteye.com/blog/808799

DesignPattern1

UMLĹ3֣ 

(1) 4֣ṹΪע
(2) ϵ4֣ϵʵֹϵϵϵ
(3) ͼ10֣ͼͼͼͼͼͼ״̬ͼͼͼЭͼ

ֹϵ
UML , ӿ, ӿӿĹϵ: (generalization) ϵ, (association)ϵ( , ۺ, ), (dependency)ϵʵ(realization)ϵ. 

ǶģߴԵĳɷֵĳ󣻹ϵһͼۼص

<1> (generalization)
һࣨΪࡢӽӿڣ̳һࣨΪࡢӿڣĹܣԼ¹̳߽ܵӿӿ֮Ĺϵ
1̳
ָһࣨΪࡢӽӿڣ̳һࣨΪࡢӿڣĹܣԼ¹̳߽ܵӿӿ֮ĹϵJavaдϵͨؼextendsȷʶʱһû顣
ʶ ʵ + Ǽͷ

</1>
<2>ʵ(realization)ϵ
1ʵ
ָһclassʵinterfaceӿڣǶĹܣʵӿ֮ĹϵJavaдϵͨؼimplementsȷʶ
ʶ  + Ǽͷ
</2>
<3>
1(dependency)ϵ
Լ򵥵⣬һAʹõһBϵǵģʹùϵǾżȻԵġʱԵġǳģBı仯Ӱ쵽AĳҪӣҪһʱ봬֮Ĺϵڴ棬ΪBΪAĳmethodʹã 
java . ϵΪ: ֲ, еĲ, ͶԾ̬ĵ.
ʶ  + ͼͷ
2(association)ϵ: 
ʹõͷʾ, ʹ˫ͷʹüͷʾ˫,ʹ˫. ˵, ÿ˵һ,ʾмʵ. 
ʾ֮,ʹһ֪һԺͷֵࡢӿ֮弶һǿϵҺҵѣֹϵǿϵżȻԡϵҲʱԵģһǳԵģ˫Ĺϵһƽȵġǵ˫ģڴ棬ΪBԵʽڹAУҲǹAһΪBȫֱ 
ʶ ʵ + ͼͷ
3ۺ(aggregation)ϵ
ǹϵһֵ벿֡ӵеĹϵhas-aĹϵʱ벿֮ǿɷģǿԾиԵڣֿڶҲΪCPU˾ԱĹϵȣڴ棬͹ϵһµģֻܴ弶֣ 
ۺϹϵҲʹʵʵֵ. java ﷨Ƿֲ;ۺϵ. 
ϵǴͬĲ, ۺϹϵǴڲƽȵĲ, һʾ, һʾ.
ʶ
4(ϳ)ϵ(composition): Ҳǹϵһֵһcontains-aĹϵֹϵȾۺϸǿҲΪǿۺϣͬ벿ּĹϵʱ벿ǲɷֵģڽҲζŲֵڽĴԣϳɹϵܹ. ڴ棬͹ϵһµģֻܴ弶, Person "Brain
ϸۺϼͬΨһǡ֡롰塱ڣ˵ ֡ڲܱȡ塱Ҫ

ۺϡֹϵֵࡢӿڼáϵǱȽֵģкܶĹϵҪ׼λǺѵģ⼸ֹϵ弶ģص֣ԴӴ沢ȫָֹϵܵ˵ֹϵֵǿ̶Ϊ>ۺ>>
</3>
<3.1>
ֹϵ
1ۺϸʵڹ ֻĹ Ϊͬ ֮֮
ͨȻȣ
ϲֺ¹¶ һֱȺӵ Ⱥ ÿһֻ㶼ԼȺ ÿȺкö ȺֹϵͿԳ֮Ϊۺ ÿֻ㶼ֻ Ĺϵͽ д˿ɼ ۺϵĹϵûϽ 㲻ΪǵȺȺɢ޷ ޷桪Ϲϵͬ
2ۺ
֮-ֹϵʱǾͿʹϻ߾ۺϡ
1.
ۺϹϵϵһ֣ǿĹϵۺ͸ĹϵԵڡھۺϹϵУͻ˿ͬʱ˽Ⱥʹ࣬ΪǶǶġ
ϹϵҲǹϵһ֣ǱȾۺϹϵǿĹϵϳɹϵǲܹġ֫ͷȡ
ʾ֮ͲֵĹϵϹϵвֺͳһڡһ󲻴ڣֶҲڡֶ֮йĹϵϹϵУͻֻʶ࣬Ͳ֪ĴڣΪ౻ܵķװڴС
2.
ۺϹϵ塱ӵС֡ڣԡ塱ɾʱ֡ᱻɾߣԹͬһ֡
Ϲϵ塱ӵС֡ڣԡ塱ɾʱ֡һɾңͬʱ乲ͬһ֡
3
ϵԶĶ󣬵һһʵһķʱ֮ҪΪϵ
ϵͬǣϵԲʽ뵽еģǵģҪ˫һ˵Ӧô˫

</3.1>
{'fraction_non_alphanumeric': 0.2000805152979066, 'fraction_numerical': 0.03864734299516908, 'mean_word_length': 6.814465408805032, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5002622', 'n_tokens_mistral': 3120, 'n_tokens_neox': 3249, 'n_words': 197}