How to ensure that builder pattern is completed?

后端 未结 7 1677
鱼传尺愫
鱼传尺愫 2021-02-05 13:38

EDIT: I am not worried about being called in the wrong order since this is enforced through using multiple interfaces, I am just worried about the terminal method getting called

相关标签:
7条回答
  • 2021-02-05 14:36

    There is the step builder pattern that does exactly what you needed : http://rdafbn.blogspot.co.uk/2012/07/step-builder-pattern_28.html

    0 讨论(0)
提交回复
热议问题