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); }
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(); } }
public void printVegetarianMenu() { System.out.println("\nVEGETARIAN MENU\n----\nBREAKFAST"); printVegetarianMenu(pancakeHouseMenu.createIterator()); System.out.println("\nLUNCH"); printVegetarianMenu(dinerMenu.createIterator()); }
public void printVegetarianMenu() { printVegetarianMenu(pancakeHouseMenu.createIterator()); printVegetarianMenu(dinerMenu.createIterator()); }