Polevoy S.V Lab_work4 #4
@ -50,7 +50,7 @@ public class SetArtilleriesGeneric<T> {
|
||||
return _places.get(position);
|
||||
}
|
||||
|
||||
public Iterator<T> getArtilleries() {
|
||||
return _places.stream().filter(Objects::nonNull).iterator();
|
||||
public Iterable<T> getArtilleries() {
|
||||
return () -> _places.stream().filter(Objects::nonNull).iterator();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user