public class Menu extends MenuComponent
Modifier and Type | Field and Description |
---|---|
(package private) java.lang.String |
description |
(package private) java.util.ArrayList<MenuComponent> |
menuComponents |
(package private) java.lang.String |
name |
Constructor and Description |
---|
Menu(java.lang.String name,
java.lang.String description) |
Modifier and Type | Method and Description |
---|---|
void |
add(MenuComponent menuComponent) |
java.util.Iterator |
createIterator() |
MenuComponent |
getChild(int i) |
java.lang.String |
getDescription() |
java.lang.String |
getName() |
void |
print() |
void |
remove(MenuComponent menuComponent) |
getPrice, isVegetarian
java.util.ArrayList<MenuComponent> menuComponents
java.lang.String name
java.lang.String description
public Menu(java.lang.String name, java.lang.String description)
public void add(MenuComponent menuComponent)
add
in class MenuComponent
public void remove(MenuComponent menuComponent)
remove
in class MenuComponent
public MenuComponent getChild(int i)
getChild
in class MenuComponent
public java.lang.String getName()
getName
in class MenuComponent
public java.lang.String getDescription()
getDescription
in class MenuComponent
public java.util.Iterator createIterator()
createIterator
in class MenuComponent
public void print()
print
in class MenuComponent