Class ConcreteBuilder

java.lang.Object
Creational.Builder.ConcreteBuilder
All Implemented Interfaces:
Builder

public class ConcreteBuilder extends Object implements Builder
Concrete implementation of the Builder interface. Constructs a specific type of product by implementing the building steps defined in the Builder interface.
  • Constructor Details

    • ConcreteBuilder

      public ConcreteBuilder()
      Constructor initializes a new Product instance.
  • Method Details

    • buildPartA

      public void buildPartA()
      Builds Part A of the product. Sets Part A to a specific value defined by this builder.
      Specified by:
      buildPartA in interface Builder
    • buildPartB

      public void buildPartB()
      Builds Part B of the product. Sets Part B to a specific value defined by this builder.
      Specified by:
      buildPartB in interface Builder
    • getResult

      public Product getResult()
      Retrieves the constructed product.
      Specified by:
      getResult in interface Builder
      Returns:
      The fully constructed Product instance.