Class ISO3166_1AlphaCountryCodeMapper
java.lang.Object
com.nimbusds.openid.connect.sdk.assurance.claims.ISO3166_1AlphaCountryCodeMapper
Utility for mapping between ISO 3166-1 alpha-2 and alpha-3 country codes.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ISO3166_1Alpha2CountryCode
toAlpha2CountryCode
(ISO3166_1Alpha3CountryCode alpha3Code) Maps the specified ISO 3166-1 alpha-3 (three letter) country code to its matching alpha-2 code, based on theRESOURCE_FILE_NAME
resource.static ISO3166_1Alpha3CountryCode
toAlpha3CountryCode
(ISO3166_1Alpha2CountryCode alpha2Code) Maps the specified ISO 3166-1 alpha-2 (two letter) country code to its matching alpha-3 code, based on theRESOURCE_FILE_NAME
resource.
-
Field Details
-
RESOURCE_FILE_NAME
The map resource.- See Also:
-
-
Constructor Details
-
ISO3166_1AlphaCountryCodeMapper
public ISO3166_1AlphaCountryCodeMapper()
-
-
Method Details
-
toAlpha3CountryCode
Maps the specified ISO 3166-1 alpha-2 (two letter) country code to its matching alpha-3 code, based on theRESOURCE_FILE_NAME
resource.- Parameters:
alpha2Code
- The ISO 3166-1 alpha-2 country code. Must not benull
.- Returns:
- The matching alpha-3 code,
null
if no mapping is present.
-
toAlpha2CountryCode
Maps the specified ISO 3166-1 alpha-3 (three letter) country code to its matching alpha-2 code, based on theRESOURCE_FILE_NAME
resource.- Parameters:
alpha3Code
- The ISO 3166-1 alpha-3 country code. Must not benull
.- Returns:
- The matching alpha-2 code,
null
if no mapping is present.
-