Open damirarh opened 1 year ago
Imported comment written by Dave Jellison on 2021-05-02T01:45:36
Probably the best explanation of the Builder Pattern that I've ever seen.
I like this approach, but how would you ensure correct ordering of method calls? One approach I've seen is to define an Interface for each stage, see: https://stackoverflow.com/questions/12212666/what-is-the-preferred-way-to-managing-order-in-the-builder-pattern but I'm interested in your take.
Imported
URL: https://www.damirscorner.com/blog/posts/20200612-ConstructingImmutableClassesWithABuilder.html