001/*
002 * oauth2-oidc-sdk
003 *
004 * Copyright 2012-2016, Connect2id Ltd and contributors.
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use
007 * this file except in compliance with the License. You may obtain a copy of the
008 * License at
009 *
010 *    http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software distributed
013 * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
014 * CONDITIONS OF ANY KIND, either express or implied. See the License for the
015 * specific language governing permissions and limitations under the License.
016 */
017
018package com.nimbusds.openid.connect.sdk.assurance.claims;
019
020
021import java.io.IOException;
022import java.io.InputStream;
023import java.util.Properties;
024
025import net.jcip.annotations.Immutable;
026
027import com.nimbusds.oauth2.sdk.ParseException;
028
029
030/**
031 * ISO 3166-1 alpha-3 (three-letter) country code.
032 *
033 * <p>Includes constants for all 249 current officially assigned ISO 3166-1
034 * alpha-3 codes.
035 */
036@Immutable
037public final class ISO3166_1Alpha3CountryCode extends ISO3166_1AlphaCountryCode {
038        
039        
040        private static final long serialVersionUID = -7659886425656766569L;
041        
042        
043        /** Aruba */
044        public static final ISO3166_1Alpha3CountryCode ABW = new ISO3166_1Alpha3CountryCode("ABW");
045        
046        /** Afghanistan */
047        public static final ISO3166_1Alpha3CountryCode AFG = new ISO3166_1Alpha3CountryCode("AFG");
048        
049        /** Angola */
050        public static final ISO3166_1Alpha3CountryCode AGO = new ISO3166_1Alpha3CountryCode("AGO");
051        
052        /** Anguilla */
053        public static final ISO3166_1Alpha3CountryCode AIA = new ISO3166_1Alpha3CountryCode("AIA");
054        
055        /** Åland Islands */
056        public static final ISO3166_1Alpha3CountryCode ALA = new ISO3166_1Alpha3CountryCode("ALA");
057        
058        /** Albania */
059        public static final ISO3166_1Alpha3CountryCode ALB = new ISO3166_1Alpha3CountryCode("ALB");
060        
061        /** Andorra */
062        public static final ISO3166_1Alpha3CountryCode AND = new ISO3166_1Alpha3CountryCode("AND");
063        
064        /** United Arab Emirates */
065        public static final ISO3166_1Alpha3CountryCode ARE = new ISO3166_1Alpha3CountryCode("ARE");
066        
067        /** Argentina */
068        public static final ISO3166_1Alpha3CountryCode ARG = new ISO3166_1Alpha3CountryCode("ARG");
069        
070        /** Armenia */
071        public static final ISO3166_1Alpha3CountryCode ARM = new ISO3166_1Alpha3CountryCode("ARM");
072        
073        /** American Samoa */
074        public static final ISO3166_1Alpha3CountryCode ASM = new ISO3166_1Alpha3CountryCode("ASM");
075        
076        /** Antarctica */
077        public static final ISO3166_1Alpha3CountryCode ATA = new ISO3166_1Alpha3CountryCode("ATA");
078        
079        /** French Southern Territories */
080        public static final ISO3166_1Alpha3CountryCode ATF = new ISO3166_1Alpha3CountryCode("ATF");
081        
082        /** Antigua and Barbuda */
083        public static final ISO3166_1Alpha3CountryCode ATG = new ISO3166_1Alpha3CountryCode("ATG");
084        
085        /** Australia */
086        public static final ISO3166_1Alpha3CountryCode AUS = new ISO3166_1Alpha3CountryCode("AUS");
087        
088        /** Austria */
089        public static final ISO3166_1Alpha3CountryCode AUT = new ISO3166_1Alpha3CountryCode("AUT");
090        
091        /** Azerbaijan */
092        public static final ISO3166_1Alpha3CountryCode AZE = new ISO3166_1Alpha3CountryCode("AZE");
093        
094        /** Burundi */
095        public static final ISO3166_1Alpha3CountryCode BDI = new ISO3166_1Alpha3CountryCode("BDI");
096        
097        /** Belgium */
098        public static final ISO3166_1Alpha3CountryCode BEL = new ISO3166_1Alpha3CountryCode("BEL");
099        
100        /** Benin */
101        public static final ISO3166_1Alpha3CountryCode BEN = new ISO3166_1Alpha3CountryCode("BEN");
102        
103        /** Bonaire, Sint Eustatius and Saba */
104        public static final ISO3166_1Alpha3CountryCode BES = new ISO3166_1Alpha3CountryCode("BES");
105        
106        /** Burkina Faso */
107        public static final ISO3166_1Alpha3CountryCode BFA = new ISO3166_1Alpha3CountryCode("BFA");
108        
109        /** Bangladesh */
110        public static final ISO3166_1Alpha3CountryCode BGD = new ISO3166_1Alpha3CountryCode("BGD");
111        
112        /** Bulgaria */
113        public static final ISO3166_1Alpha3CountryCode BGR = new ISO3166_1Alpha3CountryCode("BGR");
114        
115        /** Bahrain */
116        public static final ISO3166_1Alpha3CountryCode BHR = new ISO3166_1Alpha3CountryCode("BHR");
117        
118        /** Bahamas */
119        public static final ISO3166_1Alpha3CountryCode BHS = new ISO3166_1Alpha3CountryCode("BHS");
120        
121        /** Bosnia and Herzegovina */
122        public static final ISO3166_1Alpha3CountryCode BIH = new ISO3166_1Alpha3CountryCode("BIH");
123        
124        /** Saint Barthélemy */
125        public static final ISO3166_1Alpha3CountryCode BLM = new ISO3166_1Alpha3CountryCode("BLM");
126        
127        /** Belarus */
128        public static final ISO3166_1Alpha3CountryCode BLR = new ISO3166_1Alpha3CountryCode("BLR");
129        
130        /** Belize */
131        public static final ISO3166_1Alpha3CountryCode BLZ = new ISO3166_1Alpha3CountryCode("BLZ");
132        
133        /** Bermuda */
134        public static final ISO3166_1Alpha3CountryCode BMU = new ISO3166_1Alpha3CountryCode("BMU");
135        
136        /** Bolivia (Plurinational State of) */
137        public static final ISO3166_1Alpha3CountryCode BOL = new ISO3166_1Alpha3CountryCode("BOL");
138        
139        /** Brazil */
140        public static final ISO3166_1Alpha3CountryCode BRA = new ISO3166_1Alpha3CountryCode("BRA");
141        
142        /** Barbados */
143        public static final ISO3166_1Alpha3CountryCode BRB = new ISO3166_1Alpha3CountryCode("BRB");
144        
145        /** Brunei Darussalam */
146        public static final ISO3166_1Alpha3CountryCode BRN = new ISO3166_1Alpha3CountryCode("BRN");
147        
148        /** Bhutan */
149        public static final ISO3166_1Alpha3CountryCode BTN = new ISO3166_1Alpha3CountryCode("BTN");
150        
151        /** Bouvet Island */
152        public static final ISO3166_1Alpha3CountryCode BVT = new ISO3166_1Alpha3CountryCode("BVT");
153        
154        /** Botswana */
155        public static final ISO3166_1Alpha3CountryCode BWA = new ISO3166_1Alpha3CountryCode("BWA");
156        
157        /** Central African Republic */
158        public static final ISO3166_1Alpha3CountryCode CAF = new ISO3166_1Alpha3CountryCode("CAF");
159        
160        /** Canada */
161        public static final ISO3166_1Alpha3CountryCode CAN = new ISO3166_1Alpha3CountryCode("CAN");
162        
163        /** Cocos (Keeling) Islands */
164        public static final ISO3166_1Alpha3CountryCode CCK = new ISO3166_1Alpha3CountryCode("CCK");
165        
166        /** Switzerland */
167        public static final ISO3166_1Alpha3CountryCode CHE = new ISO3166_1Alpha3CountryCode("CHE");
168        
169        /** Chile */
170        public static final ISO3166_1Alpha3CountryCode CHL = new ISO3166_1Alpha3CountryCode("CHL");
171        
172        /** China */
173        public static final ISO3166_1Alpha3CountryCode CHN = new ISO3166_1Alpha3CountryCode("CHN");
174        
175        /** Côte d'Ivoire */
176        public static final ISO3166_1Alpha3CountryCode CIV = new ISO3166_1Alpha3CountryCode("CIV");
177        
178        /** Cameroon */
179        public static final ISO3166_1Alpha3CountryCode CMR = new ISO3166_1Alpha3CountryCode("CMR");
180        
181        /** Congo, Democratic Republic of the */
182        public static final ISO3166_1Alpha3CountryCode COD = new ISO3166_1Alpha3CountryCode("COD");
183        
184        /** Congo */
185        public static final ISO3166_1Alpha3CountryCode COG = new ISO3166_1Alpha3CountryCode("COG");
186        
187        /** Cook Islands */
188        public static final ISO3166_1Alpha3CountryCode COK = new ISO3166_1Alpha3CountryCode("COK");
189        
190        /** Colombia */
191        public static final ISO3166_1Alpha3CountryCode COL = new ISO3166_1Alpha3CountryCode("COL");
192        
193        /** Comoros */
194        public static final ISO3166_1Alpha3CountryCode COM = new ISO3166_1Alpha3CountryCode("COM");
195        
196        /** Cabo Verde */
197        public static final ISO3166_1Alpha3CountryCode CPV = new ISO3166_1Alpha3CountryCode("CPV");
198        
199        /** Costa Rica */
200        public static final ISO3166_1Alpha3CountryCode CRI = new ISO3166_1Alpha3CountryCode("CRI");
201        
202        /** Cuba */
203        public static final ISO3166_1Alpha3CountryCode CUB = new ISO3166_1Alpha3CountryCode("CUB");
204        
205        /** Curaçao */
206        public static final ISO3166_1Alpha3CountryCode CUW = new ISO3166_1Alpha3CountryCode("CUW");
207        
208        /** Christmas Island */
209        public static final ISO3166_1Alpha3CountryCode CXR = new ISO3166_1Alpha3CountryCode("CXR");
210        
211        /** Cayman Islands */
212        public static final ISO3166_1Alpha3CountryCode CYM = new ISO3166_1Alpha3CountryCode("CYM");
213        
214        /** Cyprus */
215        public static final ISO3166_1Alpha3CountryCode CYP = new ISO3166_1Alpha3CountryCode("CYP");
216        
217        /** Czechia */
218        public static final ISO3166_1Alpha3CountryCode CZE = new ISO3166_1Alpha3CountryCode("CZE");
219        
220        /** Germany */
221        public static final ISO3166_1Alpha3CountryCode DEU = new ISO3166_1Alpha3CountryCode("DEU");
222        
223        /** Djibouti */
224        public static final ISO3166_1Alpha3CountryCode DJI = new ISO3166_1Alpha3CountryCode("DJI");
225        
226        /** Dominica */
227        public static final ISO3166_1Alpha3CountryCode DMA = new ISO3166_1Alpha3CountryCode("DMA");
228        
229        /** Denmark */
230        public static final ISO3166_1Alpha3CountryCode DNK = new ISO3166_1Alpha3CountryCode("DNK");
231        
232        /** Dominican Republic */
233        public static final ISO3166_1Alpha3CountryCode DOM = new ISO3166_1Alpha3CountryCode("DOM");
234        
235        /** Algeria */
236        public static final ISO3166_1Alpha3CountryCode DZA = new ISO3166_1Alpha3CountryCode("DZA");
237        
238        /** Ecuador */
239        public static final ISO3166_1Alpha3CountryCode ECU = new ISO3166_1Alpha3CountryCode("ECU");
240        
241        /** Egypt */
242        public static final ISO3166_1Alpha3CountryCode EGY = new ISO3166_1Alpha3CountryCode("EGY");
243        
244        /** Eritrea */
245        public static final ISO3166_1Alpha3CountryCode ERI = new ISO3166_1Alpha3CountryCode("ERI");
246        
247        /** Western Sahara */
248        public static final ISO3166_1Alpha3CountryCode ESH = new ISO3166_1Alpha3CountryCode("ESH");
249        
250        /** Spain */
251        public static final ISO3166_1Alpha3CountryCode ESP = new ISO3166_1Alpha3CountryCode("ESP");
252        
253        /** Estonia */
254        public static final ISO3166_1Alpha3CountryCode EST = new ISO3166_1Alpha3CountryCode("EST");
255        
256        /** Ethiopia */
257        public static final ISO3166_1Alpha3CountryCode ETH = new ISO3166_1Alpha3CountryCode("ETH");
258        
259        /** Finland */
260        public static final ISO3166_1Alpha3CountryCode FIN = new ISO3166_1Alpha3CountryCode("FIN");
261        
262        /** Fiji */
263        public static final ISO3166_1Alpha3CountryCode FJI = new ISO3166_1Alpha3CountryCode("FJI");
264        
265        /** Falkland Islands (Malvinas) */
266        public static final ISO3166_1Alpha3CountryCode FLK = new ISO3166_1Alpha3CountryCode("FLK");
267        
268        /** France */
269        public static final ISO3166_1Alpha3CountryCode FRA = new ISO3166_1Alpha3CountryCode("FRA");
270        
271        /** Faroe Islands */
272        public static final ISO3166_1Alpha3CountryCode FRO = new ISO3166_1Alpha3CountryCode("FRO");
273        
274        /** Micronesia (Federated States of) */
275        public static final ISO3166_1Alpha3CountryCode FSM = new ISO3166_1Alpha3CountryCode("FSM");
276        
277        /** Gabon */
278        public static final ISO3166_1Alpha3CountryCode GAB = new ISO3166_1Alpha3CountryCode("GAB");
279        
280        /** United Kingdom of Great Britain and Northern Ireland */
281        public static final ISO3166_1Alpha3CountryCode GBR = new ISO3166_1Alpha3CountryCode("GBR");
282        
283        /** Georgia */
284        public static final ISO3166_1Alpha3CountryCode GEO = new ISO3166_1Alpha3CountryCode("GEO");
285        
286        /** Guernsey */
287        public static final ISO3166_1Alpha3CountryCode GGY = new ISO3166_1Alpha3CountryCode("GGY");
288        
289        /** Ghana */
290        public static final ISO3166_1Alpha3CountryCode GHA = new ISO3166_1Alpha3CountryCode("GHA");
291        
292        /** Gibraltar */
293        public static final ISO3166_1Alpha3CountryCode GIB = new ISO3166_1Alpha3CountryCode("GIB");
294        
295        /** Guinea */
296        public static final ISO3166_1Alpha3CountryCode GIN = new ISO3166_1Alpha3CountryCode("GIN");
297        
298        /** Guadeloupe */
299        public static final ISO3166_1Alpha3CountryCode GLP = new ISO3166_1Alpha3CountryCode("GLP");
300        
301        /** Gambia */
302        public static final ISO3166_1Alpha3CountryCode GMB = new ISO3166_1Alpha3CountryCode("GMB");
303        
304        /** Guinea-Bissau */
305        public static final ISO3166_1Alpha3CountryCode GNB = new ISO3166_1Alpha3CountryCode("GNB");
306        
307        /** Equatorial Guinea */
308        public static final ISO3166_1Alpha3CountryCode GNQ = new ISO3166_1Alpha3CountryCode("GNQ");
309        
310        /** Greece */
311        public static final ISO3166_1Alpha3CountryCode GRC = new ISO3166_1Alpha3CountryCode("GRC");
312        
313        /** Grenada */
314        public static final ISO3166_1Alpha3CountryCode GRD = new ISO3166_1Alpha3CountryCode("GRD");
315        
316        /** Greenland */
317        public static final ISO3166_1Alpha3CountryCode GRL = new ISO3166_1Alpha3CountryCode("GRL");
318        
319        /** Guatemala */
320        public static final ISO3166_1Alpha3CountryCode GTM = new ISO3166_1Alpha3CountryCode("GTM");
321        
322        /** French Guiana */
323        public static final ISO3166_1Alpha3CountryCode GUF = new ISO3166_1Alpha3CountryCode("GUF");
324        
325        /** Guam */
326        public static final ISO3166_1Alpha3CountryCode GUM = new ISO3166_1Alpha3CountryCode("GUM");
327        
328        /** Guyana */
329        public static final ISO3166_1Alpha3CountryCode GUY = new ISO3166_1Alpha3CountryCode("GUY");
330        
331        /** Hong Kong */
332        public static final ISO3166_1Alpha3CountryCode HKG = new ISO3166_1Alpha3CountryCode("HKG");
333        
334        /** Heard Island and McDonald Islands */
335        public static final ISO3166_1Alpha3CountryCode HMD = new ISO3166_1Alpha3CountryCode("HMD");
336        
337        /** Honduras */
338        public static final ISO3166_1Alpha3CountryCode HND = new ISO3166_1Alpha3CountryCode("HND");
339        
340        /** Croatia */
341        public static final ISO3166_1Alpha3CountryCode HRV = new ISO3166_1Alpha3CountryCode("HRV");
342        
343        /** Haiti */
344        public static final ISO3166_1Alpha3CountryCode HTI = new ISO3166_1Alpha3CountryCode("HTI");
345        
346        /** Hungary */
347        public static final ISO3166_1Alpha3CountryCode HUN = new ISO3166_1Alpha3CountryCode("HUN");
348        
349        /** Indonesia */
350        public static final ISO3166_1Alpha3CountryCode IDN = new ISO3166_1Alpha3CountryCode("IDN");
351        
352        /** Isle of Man */
353        public static final ISO3166_1Alpha3CountryCode IMN = new ISO3166_1Alpha3CountryCode("IMN");
354        
355        /** India */
356        public static final ISO3166_1Alpha3CountryCode IND = new ISO3166_1Alpha3CountryCode("IND");
357        
358        /** British Indian Ocean Territory */
359        public static final ISO3166_1Alpha3CountryCode IOT = new ISO3166_1Alpha3CountryCode("IOT");
360        
361        /** Ireland */
362        public static final ISO3166_1Alpha3CountryCode IRL = new ISO3166_1Alpha3CountryCode("IRL");
363        
364        /** Iran (Islamic Republic of) */
365        public static final ISO3166_1Alpha3CountryCode IRN = new ISO3166_1Alpha3CountryCode("IRN");
366        
367        /** Iraq */
368        public static final ISO3166_1Alpha3CountryCode IRQ = new ISO3166_1Alpha3CountryCode("IRQ");
369        
370        /** Iceland */
371        public static final ISO3166_1Alpha3CountryCode ISL = new ISO3166_1Alpha3CountryCode("ISL");
372        
373        /** Israel */
374        public static final ISO3166_1Alpha3CountryCode ISR = new ISO3166_1Alpha3CountryCode("ISR");
375        
376        /** Italy */
377        public static final ISO3166_1Alpha3CountryCode ITA = new ISO3166_1Alpha3CountryCode("ITA");
378        
379        /** Jamaica */
380        public static final ISO3166_1Alpha3CountryCode JAM = new ISO3166_1Alpha3CountryCode("JAM");
381        
382        /** Jersey */
383        public static final ISO3166_1Alpha3CountryCode JEY = new ISO3166_1Alpha3CountryCode("JEY");
384        
385        /** Jordan */
386        public static final ISO3166_1Alpha3CountryCode JOR = new ISO3166_1Alpha3CountryCode("JOR");
387        
388        /** Japan */
389        public static final ISO3166_1Alpha3CountryCode JPN = new ISO3166_1Alpha3CountryCode("JPN");
390        
391        /** Kazakhstan */
392        public static final ISO3166_1Alpha3CountryCode KAZ = new ISO3166_1Alpha3CountryCode("KAZ");
393        
394        /** Kenya */
395        public static final ISO3166_1Alpha3CountryCode KEN = new ISO3166_1Alpha3CountryCode("KEN");
396        
397        /** Kyrgyzstan */
398        public static final ISO3166_1Alpha3CountryCode KGZ = new ISO3166_1Alpha3CountryCode("KGZ");
399        
400        /** Cambodia */
401        public static final ISO3166_1Alpha3CountryCode KHM = new ISO3166_1Alpha3CountryCode("KHM");
402        
403        /** Kiribati */
404        public static final ISO3166_1Alpha3CountryCode KIR = new ISO3166_1Alpha3CountryCode("KIR");
405        
406        /** Saint Kitts and Nevis */
407        public static final ISO3166_1Alpha3CountryCode KNA = new ISO3166_1Alpha3CountryCode("KNA");
408        
409        /** Korea, Republic of */
410        public static final ISO3166_1Alpha3CountryCode KOR = new ISO3166_1Alpha3CountryCode("KOR");
411        
412        /** Kuwait */
413        public static final ISO3166_1Alpha3CountryCode KWT = new ISO3166_1Alpha3CountryCode("KWT");
414        
415        /** Lao People's Democratic Republic */
416        public static final ISO3166_1Alpha3CountryCode LAO = new ISO3166_1Alpha3CountryCode("LAO");
417        
418        /** Lebanon */
419        public static final ISO3166_1Alpha3CountryCode LBN = new ISO3166_1Alpha3CountryCode("LBN");
420        
421        /** Liberia */
422        public static final ISO3166_1Alpha3CountryCode LBR = new ISO3166_1Alpha3CountryCode("LBR");
423        
424        /** Libya */
425        public static final ISO3166_1Alpha3CountryCode LBY = new ISO3166_1Alpha3CountryCode("LBY");
426        
427        /** Saint Lucia */
428        public static final ISO3166_1Alpha3CountryCode LCA = new ISO3166_1Alpha3CountryCode("LCA");
429        
430        /** Liechtenstein */
431        public static final ISO3166_1Alpha3CountryCode LIE = new ISO3166_1Alpha3CountryCode("LIE");
432        
433        /** Sri Lanka */
434        public static final ISO3166_1Alpha3CountryCode LKA = new ISO3166_1Alpha3CountryCode("LKA");
435        
436        /** Lesotho */
437        public static final ISO3166_1Alpha3CountryCode LSO = new ISO3166_1Alpha3CountryCode("LSO");
438        
439        /** Lithuania */
440        public static final ISO3166_1Alpha3CountryCode LTU = new ISO3166_1Alpha3CountryCode("LTU");
441        
442        /** Luxembourg */
443        public static final ISO3166_1Alpha3CountryCode LUX = new ISO3166_1Alpha3CountryCode("LUX");
444        
445        /** Latvia */
446        public static final ISO3166_1Alpha3CountryCode LVA = new ISO3166_1Alpha3CountryCode("LVA");
447        
448        /** Macao */
449        public static final ISO3166_1Alpha3CountryCode MAC = new ISO3166_1Alpha3CountryCode("MAC");
450        
451        /** Saint Martin (French part) */
452        public static final ISO3166_1Alpha3CountryCode MAF = new ISO3166_1Alpha3CountryCode("MAF");
453        
454        /** Morocco */
455        public static final ISO3166_1Alpha3CountryCode MAR = new ISO3166_1Alpha3CountryCode("MAR");
456        
457        /** Monaco */
458        public static final ISO3166_1Alpha3CountryCode MCO = new ISO3166_1Alpha3CountryCode("MCO");
459        
460        /** Moldova, Republic of */
461        public static final ISO3166_1Alpha3CountryCode MDA = new ISO3166_1Alpha3CountryCode("MDA");
462        
463        /** Madagascar */
464        public static final ISO3166_1Alpha3CountryCode MDG = new ISO3166_1Alpha3CountryCode("MDG");
465        
466        /** Maldives */
467        public static final ISO3166_1Alpha3CountryCode MDV = new ISO3166_1Alpha3CountryCode("MDV");
468        
469        /** Mexico */
470        public static final ISO3166_1Alpha3CountryCode MEX = new ISO3166_1Alpha3CountryCode("MEX");
471        
472        /** Marshall Islands */
473        public static final ISO3166_1Alpha3CountryCode MHL = new ISO3166_1Alpha3CountryCode("MHL");
474        
475        /** North Macedonia */
476        public static final ISO3166_1Alpha3CountryCode MKD = new ISO3166_1Alpha3CountryCode("MKD");
477        
478        /** Mali */
479        public static final ISO3166_1Alpha3CountryCode MLI = new ISO3166_1Alpha3CountryCode("MLI");
480        
481        /** Malta */
482        public static final ISO3166_1Alpha3CountryCode MLT = new ISO3166_1Alpha3CountryCode("MLT");
483        
484        /** Myanmar */
485        public static final ISO3166_1Alpha3CountryCode MMR = new ISO3166_1Alpha3CountryCode("MMR");
486        
487        /** Montenegro */
488        public static final ISO3166_1Alpha3CountryCode MNE = new ISO3166_1Alpha3CountryCode("MNE");
489        
490        /** Mongolia */
491        public static final ISO3166_1Alpha3CountryCode MNG = new ISO3166_1Alpha3CountryCode("MNG");
492        
493        /** Northern Mariana Islands */
494        public static final ISO3166_1Alpha3CountryCode MNP = new ISO3166_1Alpha3CountryCode("MNP");
495        
496        /** Mozambique */
497        public static final ISO3166_1Alpha3CountryCode MOZ = new ISO3166_1Alpha3CountryCode("MOZ");
498        
499        /** Mauritania */
500        public static final ISO3166_1Alpha3CountryCode MRT = new ISO3166_1Alpha3CountryCode("MRT");
501        
502        /** Montserrat */
503        public static final ISO3166_1Alpha3CountryCode MSR = new ISO3166_1Alpha3CountryCode("MSR");
504        
505        /** Martinique */
506        public static final ISO3166_1Alpha3CountryCode MTQ = new ISO3166_1Alpha3CountryCode("MTQ");
507        
508        /** Mauritius */
509        public static final ISO3166_1Alpha3CountryCode MUS = new ISO3166_1Alpha3CountryCode("MUS");
510        
511        /** Malawi */
512        public static final ISO3166_1Alpha3CountryCode MWI = new ISO3166_1Alpha3CountryCode("MWI");
513        
514        /** Malaysia */
515        public static final ISO3166_1Alpha3CountryCode MYS = new ISO3166_1Alpha3CountryCode("MYS");
516        
517        /** Mayotte */
518        public static final ISO3166_1Alpha3CountryCode MYT = new ISO3166_1Alpha3CountryCode("MYT");
519        
520        /** Namibia */
521        public static final ISO3166_1Alpha3CountryCode NAM = new ISO3166_1Alpha3CountryCode("NAM");
522        
523        /** New Caledonia */
524        public static final ISO3166_1Alpha3CountryCode NCL = new ISO3166_1Alpha3CountryCode("NCL");
525        
526        /** Niger */
527        public static final ISO3166_1Alpha3CountryCode NER = new ISO3166_1Alpha3CountryCode("NER");
528        
529        /** Norfolk Island */
530        public static final ISO3166_1Alpha3CountryCode NFK = new ISO3166_1Alpha3CountryCode("NFK");
531        
532        /** Nigeria */
533        public static final ISO3166_1Alpha3CountryCode NGA = new ISO3166_1Alpha3CountryCode("NGA");
534        
535        /** Nicaragua */
536        public static final ISO3166_1Alpha3CountryCode NIC = new ISO3166_1Alpha3CountryCode("NIC");
537        
538        /** Niue */
539        public static final ISO3166_1Alpha3CountryCode NIU = new ISO3166_1Alpha3CountryCode("NIU");
540        
541        /** Netherlands */
542        public static final ISO3166_1Alpha3CountryCode NLD = new ISO3166_1Alpha3CountryCode("NLD");
543        
544        /** Norway */
545        public static final ISO3166_1Alpha3CountryCode NOR = new ISO3166_1Alpha3CountryCode("NOR");
546        
547        /** Nepal */
548        public static final ISO3166_1Alpha3CountryCode NPL = new ISO3166_1Alpha3CountryCode("NPL");
549        
550        /** Nauru */
551        public static final ISO3166_1Alpha3CountryCode NRU = new ISO3166_1Alpha3CountryCode("NRU");
552        
553        /** New Zealand */
554        public static final ISO3166_1Alpha3CountryCode NZL = new ISO3166_1Alpha3CountryCode("NZL");
555        
556        /** Oman */
557        public static final ISO3166_1Alpha3CountryCode OMN = new ISO3166_1Alpha3CountryCode("OMN");
558        
559        /** Pakistan */
560        public static final ISO3166_1Alpha3CountryCode PAK = new ISO3166_1Alpha3CountryCode("PAK");
561        
562        /** Panama */
563        public static final ISO3166_1Alpha3CountryCode PAN = new ISO3166_1Alpha3CountryCode("PAN");
564        
565        /** Pitcairn */
566        public static final ISO3166_1Alpha3CountryCode PCN = new ISO3166_1Alpha3CountryCode("PCN");
567        
568        /** Peru */
569        public static final ISO3166_1Alpha3CountryCode PER = new ISO3166_1Alpha3CountryCode("PER");
570        
571        /** Philippines */
572        public static final ISO3166_1Alpha3CountryCode PHL = new ISO3166_1Alpha3CountryCode("PHL");
573        
574        /** Palau */
575        public static final ISO3166_1Alpha3CountryCode PLW = new ISO3166_1Alpha3CountryCode("PLW");
576        
577        /** Papua New Guinea */
578        public static final ISO3166_1Alpha3CountryCode PNG = new ISO3166_1Alpha3CountryCode("PNG");
579        
580        /** Poland */
581        public static final ISO3166_1Alpha3CountryCode POL = new ISO3166_1Alpha3CountryCode("POL");
582        
583        /** Puerto Rico */
584        public static final ISO3166_1Alpha3CountryCode PRI = new ISO3166_1Alpha3CountryCode("PRI");
585        
586        /** Korea (Democratic People's Republic of) */
587        public static final ISO3166_1Alpha3CountryCode PRK = new ISO3166_1Alpha3CountryCode("PRK");
588        
589        /** Portugal */
590        public static final ISO3166_1Alpha3CountryCode PRT = new ISO3166_1Alpha3CountryCode("PRT");
591        
592        /** Paraguay */
593        public static final ISO3166_1Alpha3CountryCode PRY = new ISO3166_1Alpha3CountryCode("PRY");
594        
595        /** Palestine, State of */
596        public static final ISO3166_1Alpha3CountryCode PSE = new ISO3166_1Alpha3CountryCode("PSE");
597        
598        /** French Polynesia */
599        public static final ISO3166_1Alpha3CountryCode PYF = new ISO3166_1Alpha3CountryCode("PYF");
600        
601        /** Qatar */
602        public static final ISO3166_1Alpha3CountryCode QAT = new ISO3166_1Alpha3CountryCode("QAT");
603        
604        /** Réunion */
605        public static final ISO3166_1Alpha3CountryCode REU = new ISO3166_1Alpha3CountryCode("REU");
606        
607        /** Romania */
608        public static final ISO3166_1Alpha3CountryCode ROU = new ISO3166_1Alpha3CountryCode("ROU");
609        
610        /** Russian Federation */
611        public static final ISO3166_1Alpha3CountryCode RUS = new ISO3166_1Alpha3CountryCode("RUS");
612        
613        /** Rwanda */
614        public static final ISO3166_1Alpha3CountryCode RWA = new ISO3166_1Alpha3CountryCode("RWA");
615        
616        /** Saudi Arabia */
617        public static final ISO3166_1Alpha3CountryCode SAU = new ISO3166_1Alpha3CountryCode("SAU");
618        
619        /** Sudan */
620        public static final ISO3166_1Alpha3CountryCode SDN = new ISO3166_1Alpha3CountryCode("SDN");
621        
622        /** Senegal */
623        public static final ISO3166_1Alpha3CountryCode SEN = new ISO3166_1Alpha3CountryCode("SEN");
624        
625        /** Singapore */
626        public static final ISO3166_1Alpha3CountryCode SGP = new ISO3166_1Alpha3CountryCode("SGP");
627        
628        /** South Georgia and the South Sandwich Islands */
629        public static final ISO3166_1Alpha3CountryCode SGS = new ISO3166_1Alpha3CountryCode("SGS");
630        
631        /** Saint Helena, Ascension and Tristan da Cunha */
632        public static final ISO3166_1Alpha3CountryCode SHN = new ISO3166_1Alpha3CountryCode("SHN");
633        
634        /** Svalbard and Jan Mayen */
635        public static final ISO3166_1Alpha3CountryCode SJM = new ISO3166_1Alpha3CountryCode("SJM");
636        
637        /** Solomon Islands */
638        public static final ISO3166_1Alpha3CountryCode SLB = new ISO3166_1Alpha3CountryCode("SLB");
639        
640        /** Sierra Leone */
641        public static final ISO3166_1Alpha3CountryCode SLE = new ISO3166_1Alpha3CountryCode("SLE");
642        
643        /** El Salvador */
644        public static final ISO3166_1Alpha3CountryCode SLV = new ISO3166_1Alpha3CountryCode("SLV");
645        
646        /** San Marino */
647        public static final ISO3166_1Alpha3CountryCode SMR = new ISO3166_1Alpha3CountryCode("SMR");
648        
649        /** Somalia */
650        public static final ISO3166_1Alpha3CountryCode SOM = new ISO3166_1Alpha3CountryCode("SOM");
651        
652        /** Saint Pierre and Miquelon */
653        public static final ISO3166_1Alpha3CountryCode SPM = new ISO3166_1Alpha3CountryCode("SPM");
654        
655        /** Serbia */
656        public static final ISO3166_1Alpha3CountryCode SRB = new ISO3166_1Alpha3CountryCode("SRB");
657        
658        /** South Sudan */
659        public static final ISO3166_1Alpha3CountryCode SSD = new ISO3166_1Alpha3CountryCode("SSD");
660        
661        /** Sao Tome and Principe */
662        public static final ISO3166_1Alpha3CountryCode STP = new ISO3166_1Alpha3CountryCode("STP");
663        
664        /** Suriname */
665        public static final ISO3166_1Alpha3CountryCode SUR = new ISO3166_1Alpha3CountryCode("SUR");
666        
667        /** Slovakia */
668        public static final ISO3166_1Alpha3CountryCode SVK = new ISO3166_1Alpha3CountryCode("SVK");
669        
670        /** Slovenia */
671        public static final ISO3166_1Alpha3CountryCode SVN = new ISO3166_1Alpha3CountryCode("SVN");
672        
673        /** Sweden */
674        public static final ISO3166_1Alpha3CountryCode SWE = new ISO3166_1Alpha3CountryCode("SWE");
675        
676        /** Eswatini */
677        public static final ISO3166_1Alpha3CountryCode SWZ = new ISO3166_1Alpha3CountryCode("SWZ");
678        
679        /** Sint Maarten (Dutch part) */
680        public static final ISO3166_1Alpha3CountryCode SXM = new ISO3166_1Alpha3CountryCode("SXM");
681        
682        /** Seychelles */
683        public static final ISO3166_1Alpha3CountryCode SYC = new ISO3166_1Alpha3CountryCode("SYC");
684        
685        /** Syrian Arab Republic */
686        public static final ISO3166_1Alpha3CountryCode SYR = new ISO3166_1Alpha3CountryCode("SYR");
687        
688        /** Turks and Caicos Islands */
689        public static final ISO3166_1Alpha3CountryCode TCA = new ISO3166_1Alpha3CountryCode("TCA");
690        
691        /** Chad */
692        public static final ISO3166_1Alpha3CountryCode TCD = new ISO3166_1Alpha3CountryCode("TCD");
693        
694        /** Togo */
695        public static final ISO3166_1Alpha3CountryCode TGO = new ISO3166_1Alpha3CountryCode("TGO");
696        
697        /** Thailand */
698        public static final ISO3166_1Alpha3CountryCode THA = new ISO3166_1Alpha3CountryCode("THA");
699        
700        /** Tajikistan */
701        public static final ISO3166_1Alpha3CountryCode TJK = new ISO3166_1Alpha3CountryCode("TJK");
702        
703        /** Tokelau */
704        public static final ISO3166_1Alpha3CountryCode TKL = new ISO3166_1Alpha3CountryCode("TKL");
705        
706        /** Turkmenistan */
707        public static final ISO3166_1Alpha3CountryCode TKM = new ISO3166_1Alpha3CountryCode("TKM");
708        
709        /** Timor-Leste */
710        public static final ISO3166_1Alpha3CountryCode TLS = new ISO3166_1Alpha3CountryCode("TLS");
711        
712        /** Tonga */
713        public static final ISO3166_1Alpha3CountryCode TON = new ISO3166_1Alpha3CountryCode("TON");
714        
715        /** Trinidad and Tobago */
716        public static final ISO3166_1Alpha3CountryCode TTO = new ISO3166_1Alpha3CountryCode("TTO");
717        
718        /** Tunisia */
719        public static final ISO3166_1Alpha3CountryCode TUN = new ISO3166_1Alpha3CountryCode("TUN");
720        
721        /** Turkey */
722        public static final ISO3166_1Alpha3CountryCode TUR = new ISO3166_1Alpha3CountryCode("TUR");
723        
724        /** Tuvalu */
725        public static final ISO3166_1Alpha3CountryCode TUV = new ISO3166_1Alpha3CountryCode("TUV");
726        
727        /** Taiwan, Province of China */
728        public static final ISO3166_1Alpha3CountryCode TWN = new ISO3166_1Alpha3CountryCode("TWN");
729        
730        /** Tanzania, United Republic of */
731        public static final ISO3166_1Alpha3CountryCode TZA = new ISO3166_1Alpha3CountryCode("TZA");
732        
733        /** Uganda */
734        public static final ISO3166_1Alpha3CountryCode UGA = new ISO3166_1Alpha3CountryCode("UGA");
735        
736        /** Ukraine */
737        public static final ISO3166_1Alpha3CountryCode UKR = new ISO3166_1Alpha3CountryCode("UKR");
738        
739        /** United States Minor Outlying Islands */
740        public static final ISO3166_1Alpha3CountryCode UMI = new ISO3166_1Alpha3CountryCode("UMI");
741        
742        /** Uruguay */
743        public static final ISO3166_1Alpha3CountryCode URY = new ISO3166_1Alpha3CountryCode("URY");
744        
745        /** United States of America */
746        public static final ISO3166_1Alpha3CountryCode USA = new ISO3166_1Alpha3CountryCode("USA");
747        
748        /** Uzbekistan */
749        public static final ISO3166_1Alpha3CountryCode UZB = new ISO3166_1Alpha3CountryCode("UZB");
750        
751        /** Holy See */
752        public static final ISO3166_1Alpha3CountryCode VAT = new ISO3166_1Alpha3CountryCode("VAT");
753        
754        /** Saint Vincent and the Grenadines */
755        public static final ISO3166_1Alpha3CountryCode VCT = new ISO3166_1Alpha3CountryCode("VCT");
756        
757        /** Venezuela (Bolivarian Republic of) */
758        public static final ISO3166_1Alpha3CountryCode VEN = new ISO3166_1Alpha3CountryCode("VEN");
759        
760        /** Virgin Islands (British) */
761        public static final ISO3166_1Alpha3CountryCode VGB = new ISO3166_1Alpha3CountryCode("VGB");
762        
763        /** Virgin Islands (U.S.) */
764        public static final ISO3166_1Alpha3CountryCode VIR = new ISO3166_1Alpha3CountryCode("VIR");
765        
766        /** Viet Nam */
767        public static final ISO3166_1Alpha3CountryCode VNM = new ISO3166_1Alpha3CountryCode("VNM");
768        
769        /** Vanuatu */
770        public static final ISO3166_1Alpha3CountryCode VUT = new ISO3166_1Alpha3CountryCode("VUT");
771        
772        /** Wallis and Futuna */
773        public static final ISO3166_1Alpha3CountryCode WLF = new ISO3166_1Alpha3CountryCode("WLF");
774        
775        /** Samoa */
776        public static final ISO3166_1Alpha3CountryCode WSM = new ISO3166_1Alpha3CountryCode("WSM");
777        
778        /** Yemen */
779        public static final ISO3166_1Alpha3CountryCode YEM = new ISO3166_1Alpha3CountryCode("YEM");
780        
781        /** South Africa */
782        public static final ISO3166_1Alpha3CountryCode ZAF = new ISO3166_1Alpha3CountryCode("ZAF");
783        
784        /** Zambia */
785        public static final ISO3166_1Alpha3CountryCode ZMB = new ISO3166_1Alpha3CountryCode("ZMB");
786        
787        /** Zimbabwe */
788        public static final ISO3166_1Alpha3CountryCode ZWE = new ISO3166_1Alpha3CountryCode("ZWE");
789        
790        
791        /**
792         * The {@code iso3166_1alpha3-codes.properties} resource.
793         */
794        private static final Properties CODES_RESOURCE = new Properties();
795        
796        
797        /**
798         * Creates a new ISO 3166-1 alpha-3 country code. Normalises the code
799         * to upper case.
800         *
801         * @param value The country code value, must be three-letter.
802         */
803        public ISO3166_1Alpha3CountryCode(final String value) {
804                super(value);
805                if (value.length() != 3) {
806                        throw new IllegalArgumentException("The ISO 3166-1 alpha-3 country code must be 3 letters");
807                }
808        }
809        
810        
811        /**
812         * Returns the matching alpha-2 country code. See
813         * {@link ISO3166_1AlphaCountryCodeMapper}.
814         *
815         * @return The matching alpha-2 country code, {@code null} if none.
816         */
817        public ISO3166_1Alpha2CountryCode toAlpha2CountryCode() {
818                
819                return ISO3166_1AlphaCountryCodeMapper.toAlpha2CountryCode(this);
820        }
821        
822        
823        /**
824         * Returns the country name if available in the
825         * {@code iso3166_1alpha3-codes.properties} resource.
826         *
827         * @return The country name, {@code null} if not available.
828         */
829        @Override
830        public String getCountryName() {
831                
832                if (CODES_RESOURCE.isEmpty()) {
833                        try (InputStream is = getClass().getClassLoader().getResourceAsStream("iso3166_1alpha3-codes.properties")) {
834                                CODES_RESOURCE.load(is);
835                        } catch (IOException e) {
836                                return null;
837                        }
838                }
839                
840                return CODES_RESOURCE.getProperty(getValue());
841        }
842        
843        
844        @Override
845        public boolean equals(final Object object) {
846                
847                return object instanceof ISO3166_1Alpha3CountryCode &&
848                        this.toString().equals(object.toString());
849        }
850        
851        
852        /**
853         * Parses an ISO 3166-1 alpha-3 (three-letter) country code.
854         *
855         * @param s The string to parse. Must not be {@code null}.
856         *
857         * @return The ISO 3166-1 alpha-3 (three-letter) country code.
858         *
859         * @throws ParseException If parsing failed.
860         */
861        public static ISO3166_1Alpha3CountryCode parse(final String s)
862                throws ParseException {
863                
864                try {
865                        return new ISO3166_1Alpha3CountryCode(s);
866                } catch (IllegalArgumentException e) {
867                        throw new ParseException(e.getMessage());
868                }
869        }
870}