City constructor
This commit is contained in:
parent
07078620ae
commit
775b2124d5
1 changed files with 7 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue