全屏浏览
缩小浏览
回到页首
摘要: 策略模式(Strategy Pattern)是一种比较简单的模式,也叫做政策模式(Policy Pattern)。其定义如下:Define a family of algorithms,encapsulate each one,and make them interchangeable.(定义一组算 阅读全文
posted @ 2018-01-04 16:22 huhx 阅读(648) 评论(0) 推荐(0) 编辑
摘要: 装饰模式(Decorator Pattern)是一种比较常见的模式,其定义如下:Attach additionalresponsibilities to an object dynamically keeping the same interface.Decorators provide a fle 阅读全文
posted @ 2018-01-04 16:22 huhx 阅读(421) 评论(0) 推荐(0) 编辑