名称 Builder
结构 建筑模式
意图 将一个复杂对象的构建与它的表示分离,使得同样的构建过程可以创建不同的表示。
适用性
  • 当创建复杂对象的算法应该独立于该对象的组成部分以及它们的装配方式时。
  • 当构造过程必须允许被构造的对象有不同的表示时。
example
 1建筑模式// Builder
 2建筑模式
 3建筑模式// Intent: "Separate the construction of a complex object from its
 4建筑模式// representation so that the same construction process can create
 5建筑模式// different representations". 
 6建筑模式
 7建筑模式// For further information, read "Design Patterns", p97, Gamma et al.,
 8建筑模式// Addison-Wesley, ISBN:0-201-63361-2
 9建筑模式
10

相关文章:

  • 2021-06-14
  • 2021-05-12
  • 2021-09-12
  • 2021-10-28
  • 2021-05-05
  • 2021-04-30
猜你喜欢
  • 2021-10-25
  • 2021-08-08
  • 2022-12-23
  • 2021-10-13
  • 2022-01-08
相关资源
相似解决方案