Skip to content

Files

Latest commit

70c5203 · Oct 19, 2018

History

History
This branch is up to date with jaredtao/DesignPattern:master.

Strategy

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Oct 19, 2018
Oct 9, 2018
Oct 9, 2018
Oct 9, 2018
Oct 9, 2018
Oct 9, 2018
Oct 9, 2018
Oct 9, 2018

策略模式

将算法与其它部分分离开,只定义与算法相关的接口,然后在程序中以委托的方式来使用

使用委托这种弱关联关系可以很方便地整体替换算法。 程序运行过程中也可以替换算法