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.
生成器模式的实现可以很复杂,但一旦生成器可用,它就可以简化生成器所创建对象的构造和使用。
2
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.