桥接模式+组合模式+享元模式
2019-06-17 21:25:23 13 举报
桥接模式+透明式组合模式+安全式组合模式+享元模式UML图
作者其他创作
大纲/内容
UnsharedConcreteFlyweight
+ opeartor(extrinsicstate: int):void
Client
+ main():void
桥接模式
<<interface>>IComponent
+ addChild(IComponent):void+ removeChild(IComponent):void+ display()
实现
Composite
- childComponents:List<IComponent>
SharedConcreteFlyweight
FlyweightFactory
+ getFlyweight(String key):IFlyweight
享元模式
聚合
Leaf
IFlyweight
+ opeartor(int extrinsicstate):void
AndroidPhone
+ run()
+ display():void
<<intreface>>ISoftware
ApplePhone
Player
<<abstract>>AbstractPhoneBrand
# software:ISoftware
+ setSoftware(ISoftware software)+ abstract run()
+ addChild(IComponent):void+ removeChild(IComponent):void+ display():void
Game
安全式组合模式
透明式组合模式
0 条评论
下一页