Skip to content

Instantly share code, notes, and snippets.

@digvijaybhakuni
Created March 9, 2015 04:04
Show Gist options
  • Save digvijaybhakuni/6548be93cd6915fb5842 to your computer and use it in GitHub Desktop.
Save digvijaybhakuni/6548be93cd6915fb5842 to your computer and use it in GitHub Desktop.
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