client/ClientWindow.java
/**
		 * Refresh the menu dishes from the backend. Remove any outdated items and add new items.
		 */
Refresh the menu dishes from the backend. Remove any outdated items and add new items.
Refresh the menu dishes from the backend . Remove any outdated items and add new items .
public void refreshDishes() {
			List<Dish> dishes = client.getDishes();
			Set<Dish> oldDishes = menuItems.keySet();
			for(Dish dish : dishes) {
				if(!oldDishes.contains(dish)) {
					addDish(dish);
				}
			}
			for(Dish dish : oldDishes) {
				if(!dishes.contains(dish)) {
					removeDish(dish);
				}
			}
		}
public void refreshDishes ( ) { List < Dish > dishes = client . getDishes ( ) ; Set < Dish > oldDishes = menuItems . keySet ( ) ; for ( Dish dish : dishes ) { if ( ! oldDishes . contains ( dish ) ) { addDish ( dish ) ; } } for ( Dish dish : oldDishes ) { if ( ! dishes . contains ( dish ) ) { removeDish ( dish ) ; } } }
Refresh the menu dishes from the backend.
Refresh the menu dishes from the backend .
//Compare old and new dishes //Look for new //Look for removed