mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-15 16:58:56 +00:00
modified return type of TreasureChestItemIterator's constructor to be Iterator
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
package com.iluwatar.iterator.list;
|
||||
|
||||
import com.iluwatar.iterator.Iterator;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -47,7 +48,7 @@ public class TreasureChest {
|
||||
items.add(new Item(ItemType.WEAPON, "Dagger of poison"));
|
||||
}
|
||||
|
||||
public TreasureChestItemIterator iterator(ItemType itemType) {
|
||||
public Iterator iterator(ItemType itemType) {
|
||||
return new TreasureChestItemIterator(this, itemType);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user