Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it.
定义一组算法,分别进行封装,使它们可以互换。 该模式使得算法可以独立于它的使用者发生变化。
Strategy) DoSomething()),供 用户 使用。ConcreteStrategy) Client) SetStrategy()) 作为配置参数。strategy)。GetData())。