码迷,mamicode.com
首页 > 其他好文 > 详细

设计模式学习每天一个——Strategy模式

时间:2014-09-16 12:25:50      阅读:160      评论:0      收藏:0      [点我收藏+]

标签:des   io   ar   art   sp   on   c   ef   r   

The Strategy Pattern is a design pattern to encapsulate the variants (algorithms) and swap them strategically to alter system behavior without changing its architecture. According to GoF, Strategy Pattern is intended to, Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it.

Strategy Pattern has three participants that include Strategy, Concrete Strategy and Context.

设计模式学习每天一个——Strategy模式

标签:des   io   ar   art   sp   on   c   ef   r   

原文地址:http://www.cnblogs.com/windy86/p/3974465.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!