📜  何时使用构建器模式 - 无论代码示例

📅  最后修改于: 2022-03-11 14:56:20.706000             🧑  作者: Mango

代码示例1
When to Use Builder Pattern
1. When the process involved in creating an object is extremely complex, with lots of mandatory and optional parameters
2. When an increase in the number of constructor parameters leads to a large list of constructors
3. When client expects different representations for the object that's constructed