Class City

java.lang.Object
org.episteme.natural.earth.Place
org.episteme.social.politics.City
All Implemented Interfaces:
Serializable, Commented, ComprehensiveIdentification, Identified<Identification>, Named, Positioned<EarthCoordinate>, Temporal<Temporal<?>>

public class City extends Place
Represents a city.
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Constructor Details

    • City

      public City(String name, Country country, String zipCode, int population)
      Legacy constructor.
    • City

      public City(String name, Country country)
      Creates a new City.
      Parameters:
      name - the name of the city
      country - the country to which the city belongs
      Throws:
      NullPointerException - if any argument is null
  • Method Details

    • getLeaders

      public Set<Individual> getLeaders()
      Returns an unmodifiable view of the city's current leaders.
      Returns:
      unmodifiable set of leaders
    • addLeader

      public void addLeader(Individual leader)
      Adds an individual to the city's leadership team.
      Parameters:
      leader - the individual to add
    • removeLeader

      public void removeLeader(Individual leader)
      Removes an individual from the city's leadership.
      Parameters:
      leader - the individual to remove
    • getCountry

      public Country getCountry()
      Returns the country associated with this city.
      Returns:
      the country
    • getExactCountry

      public Country getExactCountry()
    • setCountry

      protected void setCountry(Country country)
      Internal update of country affiliation.
      Parameters:
      country - the new country
    • getZipCode

      public String getZipCode()
      Returns the postal or zip code of the city.
      Returns:
      the zip code, or null if unset
    • setZipCode

      public void setZipCode(String zipCode)
      Sets the zip code for the city.
      Parameters:
      zipCode - the code
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Place
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Place