Package model.city
Class CityRegistry
java.lang.Object
model.city.CityRegistry
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFacility
(Facility facility) Adding a facility to the collection.void
Adding a zone to the collection and updating the nr of zones of this type in cityStatistics.getZones()
void
removeFacility
(Facility facility) Removing facility from the collection.void
removeZone
(Zone zone) Removing a zone from the collection and updating the nr of zones of this type in cityStatistics.void
updateBalance
(double amount, Date now) Add given amount to budgetvoid
updateTaxRate
(double newTaxRate) Set new tax rate
-
Constructor Details
-
CityRegistry
-
-
Method Details
-
getCityStatistics
-
getFacilities
-
getZones
-
getAllCitizens
- Returns:
- list of all citizens from the city.
-
addZone
Adding a zone to the collection and updating the nr of zones of this type in cityStatistics.- Parameters:
zone
- to be added
-
removeZone
Removing a zone from the collection and updating the nr of zones of this type in cityStatistics.- Parameters:
zone
- to be removed
-
addFacility
Adding a facility to the collection.- Parameters:
facility
- to be added
-
removeFacility
Removing facility from the collection.- Parameters:
facility
- to be removed
-
updateBalance
Add given amount to budget- Parameters:
amount
- int
-
updateTaxRate
public void updateTaxRate(double newTaxRate) Set new tax rate- Parameters:
newTaxRate
- double
-