Package model.city

Class CityRegistry

java.lang.Object
model.city.CityRegistry
All Implemented Interfaces:
Serializable

public class CityRegistry extends Object implements Serializable
See Also:
  • Constructor Details

  • Method Details

    • getCityStatistics

      public CityStatistics getCityStatistics()
    • getFacilities

      public ArrayList<Facility> getFacilities()
    • getZones

      public ArrayList<Zone> getZones()
    • getAllCitizens

      public ArrayList<Citizen> getAllCitizens()
      Returns:
      list of all citizens from the city.
    • addZone

      public void addZone(Zone zone)
      Adding a zone to the collection and updating the nr of zones of this type in cityStatistics.
      Parameters:
      zone - to be added
    • removeZone

      public void removeZone(Zone zone)
      Removing a zone from the collection and updating the nr of zones of this type in cityStatistics.
      Parameters:
      zone - to be removed
    • addFacility

      public void addFacility(Facility facility)
      Adding a facility to the collection.
      Parameters:
      facility - to be added
    • removeFacility

      public void removeFacility(Facility facility)
      Removing facility from the collection.
      Parameters:
      facility - to be removed
    • updateBalance

      public void updateBalance(double amount, Date now)
      Add given amount to budget
      Parameters:
      amount - int
    • updateTaxRate

      public void updateTaxRate(double newTaxRate)
      Set new tax rate
      Parameters:
      newTaxRate - double