﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-等牛奶的咖啡-文章分类-Java设计模式</title><link>http://www.blogjava.net/coffee3236888/category/42442.html</link><description>经营属于我们的咖啡屋</description><language>zh-cn</language><lastBuildDate>Mon, 02 Nov 2009 09:23:58 GMT</lastBuildDate><pubDate>Mon, 02 Nov 2009 09:23:58 GMT</pubDate><ttl>60</ttl><item><title>Composite（组合）模式</title><link>http://www.blogjava.net/coffee3236888/articles/300568.html</link><dc:creator>等牛奶的咖啡</dc:creator><author>等牛奶的咖啡</author><pubDate>Sun, 01 Nov 2009 06:25:00 GMT</pubDate><guid>http://www.blogjava.net/coffee3236888/articles/300568.html</guid><wfw:comment>http://www.blogjava.net/coffee3236888/comments/300568.html</wfw:comment><comments>http://www.blogjava.net/coffee3236888/articles/300568.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/coffee3236888/comments/commentRss/300568.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/coffee3236888/services/trackbacks/300568.html</trackback:ping><description><![CDATA[<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="ProgId" content="Word.Document" />
<meta name="Generator" content="Microsoft Word 11" />
<meta name="Originator" content="Microsoft Word 11" />
<link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml" />
<link rel="Edit-Time-Data" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_editdata.mso" /><!--[if !mso]>
<style>
v":* {behavior:url(#default#VML);}
o":* {behavior:url(#default#VML);}
w":* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><!--[if gte mso 9]><xml>
Normal
0
7.8 磅
0
2
false
false
false
MicrosoftInternetExplorer4
</xml><![endif]--><!--[if gte mso 9]><![endif]--><style>
<!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:楷体_GB2312;
panose-1:2 1 6 9 3 1 1 1 1 1;}
@font-face
{font-family:""@楷体_GB2312";
panose-1:2 1 6 9 3 1 1 1 1 1;}
@font-face
{font-family:""@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:宋体;
mso-bidi-font-family:"Times New Roman";
color:black;}
/* Page Definitions */
@page
{}
@page Section1
{size:595.3pt 841.9pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
layout-grid:15.6pt;}
div.Section1
{page:Section1;}
-->
</style><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{
mso-style-parent:"";
font-size:10.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
</style>
<![endif]-->
<p><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">Composite</span></strong><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">（组合）模式</span></strong></p>
<p><strong>&nbsp;</strong></p>
<p><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">意图在与：让用户能够使用统一的接口处理单个对象以及对象组合</span></strong></p>
<p><strong>&nbsp;</strong></p>
<p><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">理解：</span></strong></p>
<img src="http://www.blogjava.net/images/blogjava_net/coffee3236888/42479/r_2008022419223642.gif" alt="" border="0" /><br />
<br />
<p><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;"><!--[if gte vml 1]>
<![endif]--></span></strong></p>
<p><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">Component</span></strong><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">类抽象出Leaf类和Composite类共享的公共接口，在Composite类中使用递归（iterator）定义关于对象组合的方法。</span></strong></p>
<p><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">个人感觉：composite模式就是定义一个统一的接口既可以处理单个对象，又可以处理对象的组合。其中对组合对象的处理又不断被细分到对其中所包含的单个对象的处理，（使用递归遍历各个结点）。</span></strong></p>
<img src ="http://www.blogjava.net/coffee3236888/aggbug/300568.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/coffee3236888/" target="_blank">等牛奶的咖啡</a> 2009-11-01 14:25 <a href="http://www.blogjava.net/coffee3236888/articles/300568.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Facade(外观)模式</title><link>http://www.blogjava.net/coffee3236888/articles/300251.html</link><dc:creator>等牛奶的咖啡</dc:creator><author>等牛奶的咖啡</author><pubDate>Thu, 29 Oct 2009 11:48:00 GMT</pubDate><guid>http://www.blogjava.net/coffee3236888/articles/300251.html</guid><wfw:comment>http://www.blogjava.net/coffee3236888/comments/300251.html</wfw:comment><comments>http://www.blogjava.net/coffee3236888/articles/300251.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/coffee3236888/comments/commentRss/300251.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/coffee3236888/services/trackbacks/300251.html</trackback:ping><description><![CDATA[<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="ProgId" content="Word.Document" />
<meta name="Generator" content="Microsoft Word 11" />
<meta name="Originator" content="Microsoft Word 11" />
<link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml" /><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:PunctuationKerning/>
<w:DrawingGridVerticalSpacing>7.8 磅</w:DrawingGridVerticalSpacing>
<w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery>
<w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:Compatibility>
<w:SpaceForUL/>
<w:BalanceSingleByteDoubleByteWidth/>
<w:DoNotLeaveBackslashAlone/>
<w:ULTrailSpace/>
<w:DoNotExpandShiftReturn/>
<w:AdjustLineHeightInTable/>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:UseFELayout/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles deflockedstate="false" latentstylecount="156">
</w:LatentStyles>
</xml><![endif]--><style>
<!-- /* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:楷体_GB2312;
panose-1:2 1 6 9 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:1 135135232 16 0 262144 0;}
@font-face
{font-family:"\@楷体_GB2312";
panose-1:2 1 6 9 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:1 135135232 16 0 262144 0;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
mso-pagination:none;
font-size:10.5pt;
font-family:宋体;
mso-bidi-font-family:"Times New Roman";
color:black;
mso-font-kerning:1.0pt;}
/* Page Definitions */
@page
{mso-page-border-surround-header:no;
mso-page-border-surround-footer:no;}
@page Section1
{size:595.3pt 841.9pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
mso-header-margin:42.55pt;
mso-footer-margin:49.6pt;
mso-paper-source:0;
layout-grid:15.6pt;}
div.Section1
{page:Section1;}
-->
</style><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;" lang="EN-US">Fac</span></strong><strong></strong><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;" lang="EN-US">ade</span></strong><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">（外观）模式<span lang="EN-US"><o:p></o:p></span></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;" lang="EN-US"><o:p>&nbsp;</o:p></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">旨在提供一个接口，使子系统更加容易使用<span lang="EN-US"><o:p></o:p></span></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;" lang="EN-US"><o:p>&nbsp;</o:p></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;" lang="EN-US">Before Fac</span></strong><strong></strong><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;" lang="EN-US">ade<o:p></o:p></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;" lang="EN-US"><o:p>&nbsp;<img src="http://www.blogjava.net/images/blogjava_net/coffee3236888/42479/o_Facade1.jpg" alt="" border="0" /><br />
</o:p></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;" lang="EN-US"><br />
</span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;" lang="EN-US">Using Fac</span></strong><strong></strong><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;" lang="EN-US">ade<o:p></o:p></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;" lang="EN-US"><o:p><img src="http://www.blogjava.net/images/blogjava_net/coffee3236888/42479/r_Facade2.gif" alt="" border="0" /></o:p></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;" lang="EN-US"><o:p>&nbsp;</o:p></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;" lang="EN-US">Fac</span></strong><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;" lang="EN-US">ade</span></strong><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">模式 与<span lang="EN-US"> </span></span></strong><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;" lang="EN-US">Adapter</span></strong><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">模式<span lang="EN-US"><o:p></o:p></span></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">相似：为既存的类提供界面统一的接口，以供外部类调用<span lang="EN-US"><o:p></o:p></span></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">不同：</span></strong><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">Fac</span></strong><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">ade</span></strong><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">模式的目的是简化调用关系<span lang="EN-US"><o:p></o:p></span></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;" lang="EN-US"><span>&nbsp;&nbsp;&nbsp;&nbsp; </span></span></strong><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;" lang="EN-US">Adapter</span></strong><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">模式是为不同的模块<span lang="EN-US">/</span>子系统提供一个统一的接口（支持多态），旨在将一个或多个已经存在的不统一的接口转化为另一个统一的接口<span lang="EN-US"><o:p></o:p></span></span></strong></p>
<img src ="http://www.blogjava.net/coffee3236888/aggbug/300251.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/coffee3236888/" target="_blank">等牛奶的咖啡</a> 2009-10-29 19:48 <a href="http://www.blogjava.net/coffee3236888/articles/300251.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Adapter（适配器）模式</title><link>http://www.blogjava.net/coffee3236888/articles/300225.html</link><dc:creator>等牛奶的咖啡</dc:creator><author>等牛奶的咖啡</author><pubDate>Thu, 29 Oct 2009 10:37:00 GMT</pubDate><guid>http://www.blogjava.net/coffee3236888/articles/300225.html</guid><wfw:comment>http://www.blogjava.net/coffee3236888/comments/300225.html</wfw:comment><comments>http://www.blogjava.net/coffee3236888/articles/300225.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/coffee3236888/comments/commentRss/300225.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/coffee3236888/services/trackbacks/300225.html</trackback:ping><description><![CDATA[<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="ProgId" content="Word.Document" />
<meta name="Generator" content="Microsoft Word 11" />
<meta name="Originator" content="Microsoft Word 11" />
<link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C06%5Cclip_filelist.xml" />
<link rel="Edit-Time-Data" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C06%5Cclip_editdata.mso" /><!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:PunctuationKerning/>
<w:DrawingGridVerticalSpacing>7.8 磅</w:DrawingGridVerticalSpacing>
<w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery>
<w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:Compatibility>
<w:SpaceForUL/>
<w:BalanceSingleByteDoubleByteWidth/>
<w:DoNotLeaveBackslashAlone/>
<w:ULTrailSpace/>
<w:DoNotExpandShiftReturn/>
<w:AdjustLineHeightInTable/>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:UseFELayout/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles deflockedstate="false" latentstylecount="156">
</w:LatentStyles>
</xml><![endif]--><style>
<!-- /* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:楷体_GB2312;
panose-1:2 1 6 9 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:1 135135232 16 0 262144 0;}
@font-face
{font-family:"\@楷体_GB2312";
panose-1:2 1 6 9 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:1 135135232 16 0 262144 0;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
mso-pagination:none;
font-size:10.5pt;
font-family:宋体;
mso-bidi-font-family:"Times New Roman";
color:black;
mso-font-kerning:1.0pt;}
/* Page Definitions */
@page
{mso-page-border-surround-header:no;
mso-page-border-surround-footer:no;}
@page Section1
{size:595.3pt 841.9pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
mso-header-margin:42.55pt;
mso-footer-margin:49.6pt;
mso-paper-source:0;
layout-grid:15.6pt;}
div.Section1
{page:Section1;}
-->
</style><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;" lang="EN-US">Adapter</span></strong><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">（适配器）模式<span lang="EN-US"><o:p></o:p></span></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;" lang="EN-US"><o:p>&nbsp;</o:p></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">旨在保留现有类所提供的服务，向客户提供接口，以满足客户的期望<span lang="EN-US"><o:p></o:p></span></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">即存在方法类，并可以提供给客户的需求接口<span lang="EN-US"><o:p></o:p></span></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;" lang="EN-US"><o:p>&nbsp;</o:p></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">理解1<span lang="EN-US">.</span>类适配器<span lang="EN-US"><o:p></o:p></span></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">通过继承得到已存方法类的方法使用权去实现所需的客户接口<span lang="EN-US"><o:p></o:p></span></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;" lang="EN-US"><o:p><img src="http://www.blogjava.net/images/blogjava_net/coffee3236888/42479/o_Adapter.jpg" alt="" border="0" />&nbsp;</o:p></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">理解2<span lang="EN-US">.</span>对象适配器<span lang="EN-US"><o:p></o:p></span></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">扩展一个客户所需的目标类，并把它委派给一个现有的方法类去实现<span lang="EN-US"><o:p></o:p></span></span></strong></p>
<img src="http://www.blogjava.net/images/blogjava_net/coffee3236888/42479/o_Adapter1.jpg" alt="" border="0" />
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;"><br />
</span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">区别：<span lang="EN-US"><o:p></o:p></span></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;" lang="EN-US"><span>&nbsp;&nbsp; </span></span></strong><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">类适配器是扩展一个现有的类，并实现一个目标接口<span lang="EN-US"><o:p></o:p></span></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;" lang="EN-US"><span>&nbsp;&nbsp; </span></span></strong><strong><span style="font-size: 14pt; font-family: 楷体_GB2312;">对象适配器是扩展一个目标类，并把它委派给一个现有的类<span lang="EN-US"><o:p></o:p></span></span></strong></p>
<img src ="http://www.blogjava.net/coffee3236888/aggbug/300225.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/coffee3236888/" target="_blank">等牛奶的咖啡</a> 2009-10-29 18:37 <a href="http://www.blogjava.net/coffee3236888/articles/300225.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>