Skip to Main Content
Java Design Patterns: A Hands-On Experience with Real-World Examples
book

Java Design Patterns: A Hands-On Experience with Real-World Examples

by Vaskaran Sarcar
December 2018
Intermediate to advanced content levelIntermediate to advanced
512 pages
8h 51m
English
Apress
Content preview from Java Design Patterns: A Hands-On Experience with Real-World Examples
© Vaskaran Sarcar 2019
Vaskaran SarcarJava Design Patternshttps://doi.org/10.1007/978-1-4842-4078-6_3

3. Builder Pattern

Vaskaran Sarcar1 
(1)
Bangalore, Karnataka, India
 

This chapter covers the builder pattern.

GoF Definition

Separate the construction of a complex object from its representation so that the same construction processes can create different representations.

Concept

The builder pattern is useful for creating complex objects that have multiple parts. The creational mechanism of an object should be independent of these parts. The construction process does not care about how these parts are assembled. The same construction process must allow us to create different representations of the objects.

The structure in Figure 3-1 is an example of the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java Design Patterns: A Hands-On Experience with Real-World Examples

Java Design Patterns: A Hands-On Experience with Real-World Examples

Vaskaran Sarcar
Spring Microservices in Action, Second Edition

Spring Microservices in Action, Second Edition

John Carnell, Illary Huaylupo Sanchez
Java Concurrency in Practice

Java Concurrency in Practice

Brian Goetz, Tim Peierls, Joshua Bloch, Joseph Bowbeer, David Holmes, Doug Lea

Publisher Resources

ISBN: 9781484240786Purchase LinkPublisher Website