We're sorry but rendepage doesn't work properly without JavaScript enabled. Please enable it to continue.
策略模式的优点和缺点
千锋教育
优点:
1、算法可以自由切换。
2、避免使用多重条件判断。
3、扩展性非常良好。
缺点:
1、策略类会增多。
2、所有策略类都需要对外暴露。