装饰者设计模式
装饰着 体现了开闭原则 对扩展开放,
? 基本类pojo
?
?。。。
?装饰者类
?
?
? results
?
BasicExtends1Basic 10.0BasicExtends20Basic === AchieveTest1 === AchieveTest2 === AchieveTest3 === AchieveTest4 30.0BasicExtends 30Basic === AchieveTest1 === AchieveTest2 === AchieveTest3 36.0?