City constructor

This commit is contained in:
Roman Inflianskas 2016-05-16 15:54:50 +03:00
parent 07078620ae
commit 775b2124d5

View file

@ -58,6 +58,13 @@ public class City extends MapObject {
return new City(postcode, POSTCODE_INTERNAL_ID--);
}
public City(City city) {
this.type = city.type;
this.listOfStreets = new ArrayList<>(city.listOfStreets);
this.postcode = city.postcode;
this.closestCity = city.closestCity;
}
public City(CityType type) {
if (type == null) {
throw new NullPointerException();