2015-04-20 15:36:01 -07:00
|
|
|
|
//: enumerated/menu/Food.java
|
2015-05-29 14:18:51 -07:00
|
|
|
|
// <20>2015 MindView LLC: see Copyright.txt
|
2015-04-20 15:36:01 -07:00
|
|
|
|
// Subcategorization of enums within interfaces.
|
|
|
|
|
package enumerated.menu;
|
|
|
|
|
|
|
|
|
|
public interface Food {
|
|
|
|
|
enum Appetizer implements Food {
|
|
|
|
|
SALAD, SOUP, SPRING_ROLLS;
|
|
|
|
|
}
|
|
|
|
|
enum MainCourse implements Food {
|
|
|
|
|
LASAGNE, BURRITO, PAD_THAI,
|
|
|
|
|
LENTILS, HUMMOUS, VINDALOO;
|
|
|
|
|
}
|
|
|
|
|
enum Dessert implements Food {
|
|
|
|
|
TIRAMISU, GELATO, BLACK_FOREST_CAKE,
|
|
|
|
|
FRUIT, CREME_CARAMEL;
|
|
|
|
|
}
|
|
|
|
|
enum Coffee implements Food {
|
|
|
|
|
BLACK_COFFEE, DECAF_COFFEE, ESPRESSO,
|
|
|
|
|
LATTE, CAPPUCCINO, TEA, HERB_TEA;
|
|
|
|
|
}
|
|
|
|
|
} ///:~
|