Class Federation
java.lang.Object
org.episteme.social.politics.Federation
- All Implemented Interfaces:
Serializable, Named
Represents a PsychologicalGroup of countries cooperating within a formal union or federation.
Countries in a federation may or may not share common geography. Examples include the European Union, United Nations, or a Federal State.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFederation(String name, Set<Country> countries) Initializes a new Federation. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCountry(Country country) Adds a country to the federation.booleanReturns an unmodifiable set of member countries.getName()inthashCode()voidremoveCountry(Country country) Removes a country from the federation.voidUpdates the name of the federation.toString()
-
Constructor Details
-
Federation
Initializes a new Federation.- Parameters:
name- the name of the federationcountries- set of member countries- Throws:
NullPointerException- if name is nullIllegalArgumentException- if name is empty
-
-
Method Details
-
getName
-
setName
Updates the name of the federation.- Parameters:
name- the new name
-
getCountries
-
addCountry
Adds a country to the federation.- Parameters:
country- the country to add
-
removeCountry
Removes a country from the federation.- Parameters:
country- the country to remove
-
toString
-
equals
-
hashCode
-