From 73f8bea0b44dddd09b1a5f3b76b22fbf4c661070 Mon Sep 17 00:00:00 2001 From: Hammy Date: Tue, 22 Dec 2020 07:24:19 +0000 Subject: [PATCH] Comment Out Unnecessary code --- Design Patterns/src/iterator/PancakeHouseMenu.java | 3 +++ .../src/iterator/without/custom/iterator/PancakeHouseMenu.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Design Patterns/src/iterator/PancakeHouseMenu.java b/Design Patterns/src/iterator/PancakeHouseMenu.java index c8e3550..e31141e 100644 --- a/Design Patterns/src/iterator/PancakeHouseMenu.java +++ b/Design Patterns/src/iterator/PancakeHouseMenu.java @@ -33,9 +33,12 @@ public class PancakeHouseMenu { menuItems.add(new MenuItem(name, description, vegetarian, price)); } +/* + Note: Using iterator to get rid of this code public List getMenuItems() { return menuItems; } +*/ public Iterator createIterator() { return new PancakeHouseMenuIterator(menuItems); diff --git a/Design Patterns/src/iterator/without/custom/iterator/PancakeHouseMenu.java b/Design Patterns/src/iterator/without/custom/iterator/PancakeHouseMenu.java index e45b396..36f9254 100644 --- a/Design Patterns/src/iterator/without/custom/iterator/PancakeHouseMenu.java +++ b/Design Patterns/src/iterator/without/custom/iterator/PancakeHouseMenu.java @@ -34,9 +34,12 @@ public class PancakeHouseMenu { menuItems.add(new MenuItem(name, description, vegetarian, price)); } +/* + Note: Using iterator to get rid of this code public List getMenuItems() { return menuItems; } +*/ public Iterator createIterator() { return new PancakeHouseMenuIterator(menuItems);