STRATEGY
define a family of algorithms , encapsulats each ones , and make them interchangeable . STRATEGY let the algorithm vary independently from client that use it .
定义一系列算法并逐个封装为单独的类 ,并且使之能互相交换。策略模式能使这些各种各样的算法独立的被客户端调用。(呵呵 翻译的可能不标准)
separating what changes from what stay the same .
identify the aspects of your application taht vary ang separate them from what stay the same.
Has-a can be better than Is-a.
posted on 2006-09-11 20:33
saftyfirst 阅读(83)
评论(0) 编辑 收藏 所属分类:
设计模式