Class CountryCode
java.lang.Object
org.episteme.core.util.ExtensibleEnum
org.episteme.social.politics.CountryCode
- All Implemented Interfaces:
Serializable, Comparable<ExtensibleEnum>
Extensible listing of Country Codes (ISO 3166-1 alpha-2).
Values are loaded dynamically from a JSON resource via CountryCodesReader.
To access a country code, use valueOf(String).
- Since:
- 2.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCountryCode(String code, String englishName, boolean builtIn) Constructor used by the Reader. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this is a built-in (predefined) value.static CountryCodeReturns theCountryCodecorresponding to the specified name (code).static CountryCode[]values()Methods inherited from class ExtensibleEnum
compareTo, description, equals, getDeclaringClass, hashCode, name, ordinal, toString
-
Constructor Details
-
CountryCode
-
-
Method Details
-
isBuiltIn
public boolean isBuiltIn()Description copied from class:ExtensibleEnumChecks if this is a built-in (predefined) value. Default implementation returns true to mimic standard Enum behavior unless explicitly overridden.- Overrides:
isBuiltInin classExtensibleEnum
-
getEnglishName
-
valueOf
Returns theCountryCodecorresponding to the specified name (code).- Parameters:
name- The code name (e.g. "US").- Returns:
- The CountryCode instance.
- Throws:
IllegalArgumentException- if not found.
-
values
-