Class ISO3166_1Alpha2CountryCode
- java.lang.Object
-
- com.nimbusds.oauth2.sdk.id.Identifier
-
- com.nimbusds.openid.connect.sdk.assurance.claims.CountryCode
-
- com.nimbusds.openid.connect.sdk.assurance.claims.ISO3166_1Alpha2CountryCode
-
- All Implemented Interfaces:
Serializable
,Comparable<Identifier>
,net.minidev.json.JSONAware
@Immutable public final class ISO3166_1Alpha2CountryCode extends CountryCode
ISO 3166-1 alpha-2 (two-letter) country code.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.nimbusds.oauth2.sdk.id.Identifier
DEFAULT_BYTE_LENGTH, secureRandom
-
-
Constructor Summary
Constructors Constructor Description ISO3166_1Alpha2CountryCode(String value)
Creates a new ISO 3166-1 alpha-2 country code.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
static ISO3166_1Alpha2CountryCode
parse(String s)
Parses an ISO 3166-1 alpha-2 (two-letter) country code.-
Methods inherited from class com.nimbusds.openid.connect.sdk.assurance.claims.CountryCode
toISO3166_1Alpha2CountryCode
-
Methods inherited from class com.nimbusds.oauth2.sdk.id.Identifier
compareTo, getValue, hashCode, toJSONString, toString, toStringList
-
-
-
-
Constructor Detail
-
ISO3166_1Alpha2CountryCode
public ISO3166_1Alpha2CountryCode(String value)
Creates a new ISO 3166-1 alpha-2 country code. Normalises the code to upper case.- Parameters:
value
- The country code value, must be two-letter.
-
-
Method Detail
-
equals
public boolean equals(Object object)
- Specified by:
equals
in classCountryCode
-
parse
public static ISO3166_1Alpha2CountryCode parse(String s) throws ParseException
Parses an ISO 3166-1 alpha-2 (two-letter) country code.- Parameters:
s
- The string to parse. Must not benull
.- Returns:
- The ISO 3166-1 alpha-2 (two-letter) country code.
- Throws:
ParseException
- If parsing failed.
-
-