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<?>>
Represents a city.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLeader(Individual leader) Adds an individual to the city's leadership team.booleanReturns the country associated with this city.Returns an unmodifiable view of the city's current leaders.Returns the postal or zip code of the city.inthashCode()voidremoveLeader(Individual leader) Removes an individual from the city's leadership.protected voidsetCountry(Country country) Internal update of country affiliation.voidsetZipCode(String zipCode) Sets the zip code for the city.Methods inherited from class Place
addBoundary, addInhabitant, clearBoundaries, distanceTo, getBoundaries, getCenter, getHistoricalName, getId, getInhabitants, getPosition, getPrecision, getRegion, getTraits, getType, getUncertaintyRadius, getWhen, greenwich, of, removeInhabitant, setCenter, setExistenceTime, setHistoricalName, setPrecision, setRegion, setType, setUncertaintyRadius, toStringMethods inherited from interface Commented
getComments, getTrait, setCommentsMethods inherited from interface ComprehensiveIdentification
getName, getTrait, setName, setTrait
-
Constructor Details
-
City
-
City
Creates a new City.- Parameters:
name- the name of the citycountry- the country to which the city belongs- Throws:
NullPointerException- if any argument is null
-
-
Method Details
-
getLeaders
Returns an unmodifiable view of the city's current leaders.- Returns:
- unmodifiable set of leaders
-
addLeader
Adds an individual to the city's leadership team.- Parameters:
leader- the individual to add
-
removeLeader
Removes an individual from the city's leadership.- Parameters:
leader- the individual to remove
-
getCountry
-
getExactCountry
-
setCountry
Internal update of country affiliation.- Parameters:
country- the new country
-
getZipCode
Returns the postal or zip code of the city.- Returns:
- the zip code, or null if unset
-
setZipCode
Sets the zip code for the city.- Parameters:
zipCode- the code
-
equals
-
hashCode
-