O'Reilly logo

Joy of Patterns: Using Patterns for Enterprise Development, The by Brandon Goldfedder

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

PartBuilder.java

 package ProductConfig; public class PartBuilder { public PartBuilder(PartList partList) { m_partList = partList; } public void beginPart(String name , String description ) { // We will use a composite part as the holding queue // if it turns out to be simple we will simply // transform it later m_pendingPart = new CompositePart(name,description); m_isComposite = false; } public void beginPart(String name , String description , double price) { // We will use a composite part as the holding queue // if it turns out to be simple we will simply // transform it later m_pendingPart = new CompositePart(name,description,price); m_isComposite = false; } public void endPart() { // if it's not composite transform it if (!m_isComposite) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required