Esempio n. 1
0
  public void printMenu() {
    Iterator pancakeIterator = pancakeHouseMenu.createIterator();
    Iterator dinerIterator = dinerMenu.createIterator();

    System.out.println("MENU\n----\nBREAKFAST");
    printMenu(pancakeIterator);
    System.out.println("\nLUNCH");
    printMenu(dinerIterator);
  }
Esempio n. 2
0
 public boolean isItemVegetarian(String name) {
   Iterator pancakeIterator = pancakeHouseMenu.createIterator();
   if (isVegetarian(name, pancakeIterator)) {
     return true;
   }
   Iterator dinerIterator = dinerMenu.createIterator();
   if (isVegetarian(name, dinerIterator)) {
     return true;
   }
   return false;
 }
 public void printMenu() {
   Iterator menuIterator = menus.iterator();
   while (menuIterator.hasNext()) {
     Menu menu = (Menu) menuIterator.next();
     printMenu(menu.createIterator());
     System.out.println();
   }
 }
Esempio n. 4
0
 public void printVegetarianMenu() {
   System.out.println("\nVEGETARIAN MENU\n----\nBREAKFAST");
   printVegetarianMenu(pancakeHouseMenu.createIterator());
   System.out.println("\nLUNCH");
   printVegetarianMenu(dinerMenu.createIterator());
 }
Esempio n. 5
0
 public void printVegetarianMenu() {
   printVegetarianMenu(pancakeHouseMenu.createIterator());
   printVegetarianMenu(dinerMenu.createIterator());
 }