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
安全式组合模式
透明式组合模式