2015-09-07 11:44:36 -06:00

19 lines
459 B
Java

// enums/menu/Course.java
// ©2015 MindView LLC: see Copyright.txt
package enums.menu;
import com.mindviewinc.util.*;
public enum Course {
APPETIZER(Food.Appetizer.class),
MAINCOURSE(Food.MainCourse.class),
DESSERT(Food.Dessert.class),
COFFEE(Food.Coffee.class);
private Food[] values;
private Course(Class<? extends Food> kind) {
values = kind.getEnumConstants();
}
public Food randomSelection() {
return Enums.random(values);
}
}