Class ISO3166_1AlphaCountryCodeMapper
- java.lang.Object
-
- com.nimbusds.openid.connect.sdk.assurance.claims.ISO3166_1AlphaCountryCodeMapper
-
public class ISO3166_1AlphaCountryCodeMapper extends Object
Utility for mapping between ISO 3166-1 alpha-2 and alpha-3 country codes.
-
-
Field Summary
Fields Modifier and Type Field Description static String
RESOURCE_FILE_NAME
The map resource.
-
Constructor Summary
Constructors Constructor Description ISO3166_1AlphaCountryCodeMapper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
RESOURCE_FILE_NAME
public static final String RESOURCE_FILE_NAME
The map resource.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ISO3166_1AlphaCountryCodeMapper
public ISO3166_1AlphaCountryCodeMapper()
-
-
Method Detail
-
toAlpha3CountryCode
public 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.- 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
public static 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.- 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.
-
-