摘要: 策略模式定义了一系列的算法,并将每一个算法封装起来,而且使它们还可以相互替换。策略模式让算法独立于使用它的客户而独立变化。(原文:The Strategy Pattern defines a family of algorithms,encapsulates each one,and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it.) Context(应用场景): 1、需要使用ConcreteStrategy提供的算法。 2、 内部维护一个St 阅读全文
posted @ 2011-04-02 00:07 spring yang 阅读(2304) 评论(2) 推荐(2) 编辑