How to improve the builder pattern?
The traditional builder pattern already handles this: simply take the mandatory parameters in the constructor. Of course, nothing prevents a caller from passing null, but neither does your method. The big problem I see with your method is that you either have a combinatorical explosion of classes with the number of mandatory parameters, or force … Read more