From 9c4f1d43275f0ee207e8602cb70597525bdde32c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=9F=D0=BE=D0=BB?= =?UTF-8?q?=D0=B5=D0=B2=D0=BE=D0=B9?= Date: Sat, 5 Nov 2022 16:26:26 +0400 Subject: [PATCH] First stage: Fixed SetArtilleriesGeneric --- SetArtilleriesGeneric.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); } }