定义 Allow an object to alter its behavior when its internal state changes.The object will appear to change its class.(当一...
定义 Allow an object to alter its behavior when its internal state changes.The object will appear to change its class.(当一...
定义 Represent an operation to be performed on the elements of an object structure. Visitor lets you define a new operati...
定义 Without violating encapsulation,capture and externalize an object's internal state so that the object can be restore...
定义 Provide a unified interface to a set of interfaces in a subsystem.Facade defines a higher-level interface that makes...
定义 Define a one-to-many dependency between objects so that when one object changes state,all its dependents are notifie...
定义 Compose objects into tree structures to represent part-whole hierarchies.Composite lets clients treat individual obj...
定义 Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representat...
定义 Convert the interface of a class into another interface clients expect.Adapter lets classes work together that could...
定义 Define a family of algorithms,encapsulate each one,and make them interchangeable.(定义一组算法,将每个算法都封装起来,并且使它们之间可以互换。) U...
定义 Attach additional responsibilities to an object dynamically keeping the same interface.Decorators provide a flexible...