摘要:
一、 1.因为是操作经常变化,所以封装操作为command对象。You can do that by introducing “command objects” into your design. A command object encapsulates a request to do somet 阅读全文
摘要:
一、 1.The Singleton Pattern ensures a class has only one instance, and provides a global point of access to it. 2. 3. 二、例子一:线程不安全 1 package headfirst.d 阅读全文
摘要:
一、 1.The Facade Pattern provides a unifi ed interface to a set of interfaces in a subsytem. Facade defi nes a higher-level interface that makes the su 阅读全文
摘要:
一、 1."工厂模式"不是种真正的设计模式,而是一种编程术语 2.The Factory Method Pattern defi nes an interface for creating an object, but lets subclasses decide which class to in 阅读全文
摘要:
一、 1.The Decorator Pattern attaches additional responsibilities to an object dynamically.Decorators provide a fl exible alternative to subclassing for 阅读全文