Created
November 26, 2017 19:27
-
-
Save mhtmalpani/14061c0e49ab2abaef76c10a910b34f5 to your computer and use it in GitHub Desktop.
The helper interfaces for Builder pattern with Twist
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
public interface Bread { | |
Toast bread(String bread); | |
} | |
public interface Toast { | |
Type toast(boolean toast); | |
} | |
public interface Type { | |
Veg veg(); | |
NonVeg nonVeg(); | |
} | |
public interface NonVeg { | |
Veg chicken(); | |
Veg mutton(); | |
} | |
public interface Veg { | |
Veg onion(); | |
Veg tomato(); | |
Veg olives(); | |
Extra prepare(); | |
} | |
public interface Extra { | |
Extra cheese(String cheese); | |
Subway build(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment