摘要:
一、建造者模式 建造者模式,也叫生成器模式,定义为:Separate the construction of a complex object from its representation so that the same construction process can create diffe 阅读全文
摘要:
一、模板方法模式 模板方法模式。定义为:Define the skeleton of an algorithm in an operation,deferring some steps to subclasses.Template Method lets subclasses redefine ce 阅读全文
摘要:
一、工厂方法模式 工厂方法模式。定义为:Define an interface for creating an object,but let subclasses decide which class toinstantiate.Factory Method lets a class defer i 阅读全文
摘要:
一、单例模式 单例模式(Singleton Pattern)是一个比较简单的模式,其定义如下:Ensure a class has only one instance, and provide a global point of access to it.(确保某一个类只有一个实例,而且自行实例化并 阅读全文