dimanche 31 mai 2015

Ambiguity at Builder Design Pattern

I have several questions on the Builder Pattern. Builder Pattern uses several methods for constructing an instance of a class and each method return this as return value.

My questions are:

  1. Why does each method return a return type instance of same class?
  2. What is the benefit of this pattern vs using setter method?

Aucun commentaire:

Enregistrer un commentaire