- Design Patterns and Best Practices in Java
- Kamalmeet Singh Adrian Ianculescu LUCIAN PAUL TORJE
- 92字
- 2021-06-25 20:52:34
Simplified builder pattern
In some implementations of the builder pattern, the Director class can be removed. In our class example, the logic it encapsulates is quite simple, so in that case we don't really need a director. In this case, the simplified builder pattern would look like this:

The code that was implemented in the Director class is simply moved to the Client. This change is not recommended when the Builder and Product classes are too complex or when the builder is used to build an object from a stream of data.
推薦閱讀
- Learn TypeScript 3 by Building Web Applications
- Beginning C++ Game Programming
- 機器人Python青少年編程開發(fā)實例
- Java設計模式及實踐
- WordPress Plugin Development Cookbook(Second Edition)
- 精通Python自然語言處理
- Reactive Android Programming
- 微信小程序入門指南
- NGINX Cookbook
- C/C++數(shù)據(jù)結(jié)構(gòu)與算法速學速用大辭典
- Oracle GoldenGate 12c Implementer's Guide
- BeagleBone Robotic Projects(Second Edition)
- 實戰(zhàn)Java高并發(fā)程序設計(第2版)
- 深度實踐KVM:核心技術、管理運維、性能優(yōu)化與項目實施
- 可視化H5頁面設計與制作:Mugeda標準教程