import java.util.LinkedHashMap; import java.util.List; public class MapsCollection { public LinkedHashMap> _mapStorages; private int _pictureWidth; private int _pictureHeight; public List getKeys() { return _mapStorages.keySet().stream().toList(); } public MapsCollection(int pictureWidth, int pictureHeight) { _mapStorages = new LinkedHashMap<>(); _pictureWidth = pictureWidth; _pictureHeight = pictureHeight; } public void AddMap(String name, AbstractMap map) { // TODO Прописать логику для добавления boolean check = _mapStorages.containsKey(name); if (check) return; _mapStorages.put(name, new MapWithSetAircraftsGeneric(_pictureWidth, _pictureHeight, map)); } public void DelMap(String name) { // TODO Прописать логику для удаления _mapStorages.remove(name); } public MapWithSetAircraftsGeneric getMap(String name) { return _mapStorages.getOrDefault(name, null); } }