The builder pattern seems to be good if you create a linear chain of things (java StringBuilder) or create an object with many properties (PizzaBuilder).
Is it possible to expand it to build a tree without specifying confusing node locations?
a / | \ cde / \ fg TreeBuilder tb.addNode(levelNumber, parentNumber, nodeName) // I think this is terrible tb.addNode(2, 3, g) //terrible
Or is it not a good idea with this template?
thanks
source share