
import java.util.*;
import java.lang.*;
import java.io.*;

class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Pizza myPizza = new PizzaBuilder()
			.setDough(Dough.WHITE)
			.setCheese(Cheese.WHITE)
			.addTopping(Topping.Kittens)
			.addTopping(Topping.Salami)
			.buildPizza();
	}
	
	static enum Dough{
		WHITE, BROWN
	}
	static enum Cheese{
		WHITE, BROWN
	}
	static enum Topping{
		Kittens, Onions, Salami
	}
	
	static class Pizza{
	
		private Dough dough;
		private Cheese cheese;
		private HashSet<Topping> toppings;
		
		private Pizza(Dough dough, Cheese cheese, HashSet<Topping> toppings){
			this.dough = dough;
			this.cheese = cheese;
			this.toppings = toppings;
		}
		
		//add some getters
		
	}
	
	static class PizzaBuilder{
		
		private Dough dough;
		private Cheese cheese;
		private HashSet<Topping> toppings = new HashSet<Topping>();
		
		public PizzaBuilder(){
			
		}
		public PizzaBuilder setDough(Dough dough){
			this.dough = dough;
			return this;
		}
		public PizzaBuilder setCheese(Cheese cheese){
			this.cheese = cheese;
			return this;
		}
		public PizzaBuilder addTopping(Topping topping){
			this.toppings.add(topping);
			return this;
		}
		public Pizza buildPizza(){
			return new Pizza(this.dough, this.cheese, this.toppings);
		}
	
	}
	
}


