Package Creational.Builder
Class Director
java.lang.Object
Creational.Builder.Director
Orchestrates the construction process.
The Director class uses a Builder to construct a Product in a predefined sequence.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConstructs the product by invoking the builder's methods in sequence.Retrieves the constructed product from the builder.
-
Constructor Details
-
Director
Constructs a Director with the given builder.- Parameters:
builder- The Builder instance to use for constructing the product.
-
-
Method Details
-
construct
public void construct()Constructs the product by invoking the builder's methods in sequence. -
getProduct
Retrieves the constructed product from the builder.- Returns:
- The constructed Product instance.
-