Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Design Pattern & UML  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 Re:Decorator 与 Composite 模式? [Re:floater]
jameszhang



CJSDN高级会员


发贴: 1594
积分: 111
于 2004-12-03 08:01 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
floater wrote:
Decorator:
Change Human to Worker for a better name, because you have getJob().
SoldierDecorator and DeveloperDecorator should implement Human interface too.
Then we could do a chain decoration to return something like 在 部队 软件公司 打工的
SoldierDecorator jamesSoldier = new SoldierDecorator(new DeveloperDecorator(james));

哈!我就是怕出现这个,呵呵,现实中怎么可能两个都有



Change Cjsdn_pour to CjsdnPourTeam, for
1. java naming convention
2. PourMan vs PourTeam


改这样


jameszhang edited on 2004-12-03 08:05

"First they ignore u, then they laugh at u, then they fight u, then u will win

Mahatma Gandhi"


话题树型展开
人气 标题 作者 字数 发贴时间
15567 Decorator 与 Composite 模式? jameszhang 57 2004-11-19 10:51
14131 Re:Decorator 与 Composite 模式? sanshaoye 899 2004-11-19 12:16
13790 Re:Decorator 与 Composite 模式? floater 905 2004-11-22 13:26
13456 Re:Decorator 与 Composite 模式? jameszhang 962 2004-12-02 11:24
13492 Re:Decorator 与 Composite 模式? jameszhang 1270 2004-12-02 16:03
13430 Re:Decorator 与 Composite 模式? floater 416 2004-12-02 23:33
13668 Re:Decorator 与 Composite 模式? jameszhang 511 2004-12-03 08:01
13432 Re:Decorator 与 Composite 模式? floater 124 2004-12-03 23:08
14509 Re:Decorator 与 Composite 模式? jameszhang 173 2004-12-04 10:13
13641 Re:Decorator 与 Composite 模式? emarket 512 2004-11-21 14:18
13562 Re:Decorator 与 Composite 模式? jameszhang 56 2004-11-22 09:17
13567 Re:Decorator 与 Composite 模式? emarket 134 2004-11-22 10:27
13547 Re:Decorator 与 Composite 模式? wes109 269 2004-11-22 10:56
13525 Re:Decorator 与 Composite 模式? jameszhang 62 2004-11-22 11:28
13567 Re:Decorator 与 Composite 模式? emarket 251 2004-11-23 13:46
13609 Re:Decorator 与 Composite 模式? wes109 230 2004-11-22 11:46
13506 Re:Decorator 与 Composite 模式? jameszhang 108 2004-11-22 11:55
13527 Re:Decorator 与 Composite 模式? wes109 207 2004-11-22 13:13

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923