/**
* Author: jfson
* Create on: 2017/9/20
* Description:
*/
public class Coffee {
public String water; //放多少水
public String coffee; // 放多少咖啡
public String ice; // 多少冰
public String suger; // 多少糖
public Coffee() {
}
public Coffee(Coffee coffee) {
if (coffee == null) {
return;
}
this.water = coffee.water;
this.coffee = coffee.coffee;
this.ice = coffee.ice;
this.suger = coffee.suger;
}
public static final class Builder {
private Coffee mCoffee;
public Builder() {
mCoffee = new Coffee();
}
public Coffee.Builder setWater(String water){
mCoffee.water = water;
return Builder.this;
}
public Coffee.Builder setCoffee(String coffee){
mCoffee.coffee = coffee;
return Builder.this;
}
public Coffee.Builder setIce(String ice){
mCoffee.ice = ice;
return Builder.this;
}
public Coffee.Builder setSuger(String suger){
mCoffee.suger = suger;
return Builder.this;
}
public Coffee build(){
return new Coffee(mCoffee);
}
}
}