Created
March 9, 2015 04:04
-
-
Save digvijaybhakuni/6548be93cd6915fb5842 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.digvijayb.aglorithms.pattern.creation; | |
/** | |
* Created by digvijayb on 9/3/15. | |
*/ | |
public class ClientCB { | |
public static void builderClient(){ | |
/** | |
* Some Code | |
*/ | |
Product.Builder builder = new Product.Builder("iPhone5", "iPhone 5C", 499.90);//fill in the required field | |
builder.brand("apple").maxRetialPrice(699.99);//chaining is done as it return itself | |
Product iPhone = builder.build(); // building the immutable object of product iphone | |
/** | |
* Some Code that use iPhone object | |
*/ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment