diff --git a/SetArtilleriesGeneric.java b/SetArtilleriesGeneric.java index be9ad0c..aa8aa9a 100644 --- a/SetArtilleriesGeneric.java +++ b/SetArtilleriesGeneric.java @@ -50,7 +50,7 @@ public class SetArtilleriesGeneric { return _places.get(position); } - public Iterator getArtilleries() { - return _places.stream().filter(Objects::nonNull).iterator(); + public Iterable getArtilleries() { + return () -> _places.stream().filter(Objects::nonNull).iterator(); } }