@KwrkImmutable @CompileStatic class UnLoCode extends Object implements PostMapConstructorCheckable
Code conforming to the UN/LOCODE standard.
Useful reference: https://service.unece.org/trade/locode/Service/LocodeColumn.htm - Section: 1.2 Column "LOCODE"Type | Name and description |
---|---|
static Pattern |
CODE_PATTERN |
static UnLoCode |
UNKNOWN_UN_LO_CODE |
String |
code Code for the UnLoCode location. |
Constructor and description |
---|
UnLoCode() |
Type Params | Return Type | Name and description |
---|---|---|
|
String |
getCountryCode() Fetches ISO 3166 alpha-2 Country Code. |
|
String |
getLocationCode() The part of full UN/LOCODE which refers to the location itself. |
|
void |
postMapConstructorCheck(Map<String, ?> constructorArguments) |
Code for the UnLoCode location.
The two first digits in indicates the country in which the place is located. The values used concur with the ISO 3166 alpha-2 Country Code. In the next part of the code you can find a 3-character code for the location. The 3-character code element for the location will normally comprise three letters. However, where all permutations available for a country have been exhausted, the numerals 2-9 may also be used.Groovy Documentation