建造者模式(Builder Pattern)也叫做生成器模式,其定义如下:
Separate the construction of a complex object from its representation so that the same construction process can create different representations.
将一个复杂对象的构建与它的表示分离,使得同样的构建过程可以创建不同的表示.
设计模式之模版方法模式
模板方法模式的定义
定义一个操作中的算法的框架,而将一些步骤延迟到子类中。使得子类可以不改
变一个算法的结构即可重定义该算法的某些特定步骤
Define the skeleton of an algorithm in an operation,deferring some steps to subclasses.Template
Method lets subclasses redefine certain steps of an algorithm without changing the algorithm’s
structure
设计模式之抽象工厂模式
Provide a interface for creating families of related or dependent objects without specifing their concrete classess.
我的翻译:提供一个接口用来定义一系列有共同相关性的或互相依赖的对象,但不用指定具体的实现类。
设计模式之工厂模式
Define an interface for creating an object, but let subclass decide which class to instantiate, Factory Method lets a class defer instantiation to subclass.
定义一个创建对象的接口,让子类决定实例化那一个类,工厂方法是一个类的实例化延迟到子类。
设计模式之单例模式
单例模式是一个简单的设计模式,其定义是
Ensure a class has only one instance, and provide a global point of access to it.
确保一个类只有一个实例,并提供全局访问点访问他