Content deleted Content added
Added section questioning long Examples section |
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags |
||
Line 6:
A major benefit of builders is that they can be used to create immutable objects without complex constructors. In Java, the builder pattern also simulates named constructor parameters:
<
public final class Pizza {
private final String dough;
Line 52:
}
}
</syntaxhighlight>
==Abstract Builder class==
Line 156:
== C# implementation ==
In keeping with C# style, shouldn't properties be used instead of java-like setters?
<
public string Dough {
get {return _dough;}
Line 165:
}
...
</syntaxhighlight>
== Critics ==
Line 197:
disappears:
<
class Pizza:
def __init__(self,dough='Hand Tossed', sauce='Marinara', topping='Cheese'):
Line 206:
# Use the standard dough
p = Pizza(sauce='Garlic Butter', topping='Pepperoni')
</syntaxhighlight>
...But then, the "Definition" section of the article says this:
|