...》By Adam Freeman,一些地方做了些许修改,并将代码升级到了Swift2.0,翻译不当之处望多包涵。 建造者模式(The Builder Pattern) 建造者模式用来将对象的配置从创建中分离出来。请求组件有配置数据并将它传递给中间人-建造者-它负责创建代表组件的对象。
基于62个网页-相关网页
The prototype USES a SAX parser mechanism 1 coupled with the builder pattern to perform this task.
原型使用SAX解析器机制1和构造器模式来执行该任务。
The implementation of the builder pattern can be complex, but once the builder is available, it simplifies the construction and use of the objects the builder creates.
生成器模式的实现可以很复杂,但一旦生成器可用,它就可以简化生成器所创建对象的构造和使用。
You use the builder design pattern when you need to separate the construction of complex objects from their representation, so you can use the same construction process to create a variety of objects.
在需要分离复杂对象的构建和表示时,就需要用到生成器设计模式,您可以使用相同的构造过程来创建多个对象。
应用推荐