fix bugs, ready lab 6

This commit is contained in:
ekallin 2023-12-19 12:47:07 +04:00
parent a81842346b
commit 20775f7f26
3 changed files with 8 additions and 1 deletions

View File

@ -91,4 +91,8 @@ public class LocomotiveGenericCollection<T extends DrawingLocomotive,U extends I
i++;
}
}
public void clear() {
_collection.clear();
}
}

View File

@ -96,7 +96,7 @@ public class LocomotivesGenericStorage {
LocomotiveGenericCollection<DrawingLocomotive, DrawingObjectLocomotive> collection;
if (_locomotiveStorage.containsKey(key)){
collection = _locomotiveStorage.get(key);
// collection.clear(); // what is the wtf???
collection.clear();
}
else
collection = new LocomotiveGenericCollection<>(_pictureWidth, _pictureHeight);

View File

@ -66,4 +66,7 @@ public class SetGeneric<T extends DrawingLocomotive>{
return _places;
}
public void clear() {
_places.clear();
}
}