Don't Underestimate The Factories Don't Lose Your Train Of Thoughts
The builder for the SurvivalKit came handy for as long as we had only a single configuration to create.
However, defining the SurvivalKitItem now allows us to have kits with varying items. Thus different configurations.
So how can our builder accomodate for that change? Let’s find out.
You could put in a flag along with a switch statement which produces a different kit every time but that would mean that you are abusing the if. Could you use the Strategy pattern then in the same manner? You could, but there is a much more elegant way to go about it, that is use a factory.
You might think that the factory makes the builder obsolete. Far from it. It’s actually complementary by using the builder to create different configurations for the kit.
Notice how the builder provides the methods to customize the kit in addition to reasonable constants and defaults. The factory on the other hand holds all the new operators that make up a kit each time.
Not only you have encapsulated construction of the SurvivalKit that way but also provided custom instances.
Be careful not to abuse it by providing every possible custom configuration for the kit. Your client code should still be able to use the builder as intended.