将一个复杂对象的构建与它的表示分离,使得同样的构建过程可以创建不同的表示。
当同时满足以下情况的时候可以使用Builder模式:
将一个“复杂对象的构建算法”与它的“部件及组装方式”分离,使得构件算法和组装方式可以独立应对变化;复用同样的构建算法可以创建不同的表示,不同的构建过程可以复用相同的部件组装方式。是Builder模式的核心思想。