25 lines
675 B
Java
25 lines
675 B
Java
// enums/menu/Food.java
|
|
// (c)2016 MindView LLC: see Copyright.txt
|
|
// We make no guarantees that this code is fit for any purpose.
|
|
// Visit http://OnJava8.com for more book information.
|
|
// Subcategorization of enums within interfaces
|
|
package enums.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;
|
|
}
|
|
}
|