摘要: 策略模式 1.定义 一个类的行为或其算法可以在运行时进行更改。 策略模式通常有3种角色。 AbstractStrategy:抽象策略角色。策略,算法的抽象。 public interface AbstractStrategy { /** * 策略的行为,算法 */ void operate(); } 阅读全文
posted @ 2020-08-27 22:09 jeff_chang 阅读(167) 评论(0) 推荐(0) 编辑