< prev index next >

src/java.base/share/classes/java/util/LocaleISOData.java

Print this page


   1 /*
   2  * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 214         + "wo" + "wol"  // Wolof
 215         + "xh" + "xho"  // Xhosa
 216         + "yi" + "yid"  // Yiddish
 217         + "yo" + "yor"  // Yoruba
 218         + "za" + "zha"  // Zhuang
 219         + "zh" + "zho"  // Chinese
 220         + "zu" + "zul"  // Zulu
 221         ;
 222 
 223     /**
 224      * The 2- and 3-letter ISO 3166 country codes.
 225      */
 226     static final String isoCountryTable =
 227           "AD" + "AND"  // Andorra, Principality of
 228         + "AE" + "ARE"  // United Arab Emirates
 229         + "AF" + "AFG"  // Afghanistan
 230         + "AG" + "ATG"  // Antigua and Barbuda
 231         + "AI" + "AIA"  // Anguilla
 232         + "AL" + "ALB"  // Albania, People's Socialist Republic of
 233         + "AM" + "ARM"  // Armenia
 234         + "AN" + "ANT"  // Netherlands Antilles
 235         + "AO" + "AGO"  // Angola, Republic of
 236         + "AQ" + "ATA"  // Antarctica (the territory South of 60 deg S)
 237         + "AR" + "ARG"  // Argentina, Argentine Republic
 238         + "AS" + "ASM"  // American Samoa
 239         + "AT" + "AUT"  // Austria, Republic of
 240         + "AU" + "AUS"  // Australia, Commonwealth of
 241         + "AW" + "ABW"  // Aruba
 242         + "AX" + "ALA"  // \u00c5land Islands
 243         + "AZ" + "AZE"  // Azerbaijan, Republic of
 244         + "BA" + "BIH"  // Bosnia and Herzegovina
 245         + "BB" + "BRB"  // Barbados
 246         + "BD" + "BGD"  // Bangladesh, People's Republic of
 247         + "BE" + "BEL"  // Belgium, Kingdom of
 248         + "BF" + "BFA"  // Burkina Faso
 249         + "BG" + "BGR"  // Bulgaria, People's Republic of
 250         + "BH" + "BHR"  // Bahrain, Kingdom of
 251         + "BI" + "BDI"  // Burundi, Republic of
 252         + "BJ" + "BEN"  // Benin, People's Republic of
 253         + "BL" + "BLM"  // Saint Barth\u00e9lemy
 254         + "BM" + "BMU"  // Bermuda


 460         + "UM" + "UMI"  // United States Minor Outlying Islands
 461         + "US" + "USA"  // United States of America
 462         + "UY" + "URY"  // Uruguay, Eastern Republic of
 463         + "UZ" + "UZB"  // Uzbekistan
 464         + "VA" + "VAT"  // Holy See (Vatican City State)
 465         + "VC" + "VCT"  // St. Vincent and the Grenadines
 466         + "VE" + "VEN"  // Venezuela, Bolivarian Republic of
 467         + "VG" + "VGB"  // British Virgin Islands
 468         + "VI" + "VIR"  // US Virgin Islands
 469         + "VN" + "VNM"  // Viet Nam, Socialist Republic of
 470         + "VU" + "VUT"  // Vanuatu
 471         + "WF" + "WLF"  // Wallis and Futuna Islands
 472         + "WS" + "WSM"  // Samoa, Independent State of
 473         + "YE" + "YEM"  // Yemen
 474         + "YT" + "MYT"  // Mayotte
 475         + "ZA" + "ZAF"  // South Africa, Republic of
 476         + "ZM" + "ZMB"  // Zambia, Republic of
 477         + "ZW" + "ZWE"  // Zimbabwe
 478         ;
 479 























 480     private LocaleISOData() {
 481     }
 482 }
   1 /*
   2  * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 214         + "wo" + "wol"  // Wolof
 215         + "xh" + "xho"  // Xhosa
 216         + "yi" + "yid"  // Yiddish
 217         + "yo" + "yor"  // Yoruba
 218         + "za" + "zha"  // Zhuang
 219         + "zh" + "zho"  // Chinese
 220         + "zu" + "zul"  // Zulu
 221         ;
 222 
 223     /**
 224      * The 2- and 3-letter ISO 3166 country codes.
 225      */
 226     static final String isoCountryTable =
 227           "AD" + "AND"  // Andorra, Principality of
 228         + "AE" + "ARE"  // United Arab Emirates
 229         + "AF" + "AFG"  // Afghanistan
 230         + "AG" + "ATG"  // Antigua and Barbuda
 231         + "AI" + "AIA"  // Anguilla
 232         + "AL" + "ALB"  // Albania, People's Socialist Republic of
 233         + "AM" + "ARM"  // Armenia
 234 //      + "AN" + "ANT"  // Netherlands Antilles
 235         + "AO" + "AGO"  // Angola, Republic of
 236         + "AQ" + "ATA"  // Antarctica (the territory South of 60 deg S)
 237         + "AR" + "ARG"  // Argentina, Argentine Republic
 238         + "AS" + "ASM"  // American Samoa
 239         + "AT" + "AUT"  // Austria, Republic of
 240         + "AU" + "AUS"  // Australia, Commonwealth of
 241         + "AW" + "ABW"  // Aruba
 242         + "AX" + "ALA"  // \u00c5land Islands
 243         + "AZ" + "AZE"  // Azerbaijan, Republic of
 244         + "BA" + "BIH"  // Bosnia and Herzegovina
 245         + "BB" + "BRB"  // Barbados
 246         + "BD" + "BGD"  // Bangladesh, People's Republic of
 247         + "BE" + "BEL"  // Belgium, Kingdom of
 248         + "BF" + "BFA"  // Burkina Faso
 249         + "BG" + "BGR"  // Bulgaria, People's Republic of
 250         + "BH" + "BHR"  // Bahrain, Kingdom of
 251         + "BI" + "BDI"  // Burundi, Republic of
 252         + "BJ" + "BEN"  // Benin, People's Republic of
 253         + "BL" + "BLM"  // Saint Barth\u00e9lemy
 254         + "BM" + "BMU"  // Bermuda


 460         + "UM" + "UMI"  // United States Minor Outlying Islands
 461         + "US" + "USA"  // United States of America
 462         + "UY" + "URY"  // Uruguay, Eastern Republic of
 463         + "UZ" + "UZB"  // Uzbekistan
 464         + "VA" + "VAT"  // Holy See (Vatican City State)
 465         + "VC" + "VCT"  // St. Vincent and the Grenadines
 466         + "VE" + "VEN"  // Venezuela, Bolivarian Republic of
 467         + "VG" + "VGB"  // British Virgin Islands
 468         + "VI" + "VIR"  // US Virgin Islands
 469         + "VN" + "VNM"  // Viet Nam, Socialist Republic of
 470         + "VU" + "VUT"  // Vanuatu
 471         + "WF" + "WLF"  // Wallis and Futuna Islands
 472         + "WS" + "WSM"  // Samoa, Independent State of
 473         + "YE" + "YEM"  // Yemen
 474         + "YT" + "MYT"  // Mayotte
 475         + "ZA" + "ZAF"  // South Africa, Republic of
 476         + "ZM" + "ZMB"  // Zambia, Republic of
 477         + "ZW" + "ZWE"  // Zimbabwe
 478         ;
 479 
 480     /**
 481      * Array to hold country codes for ISO3166-3.
 482      */
 483     static final String[] ISO3166_3 = {
 484         "AIDJ", "ANHH", "BQAQ", "BUMM", "BYAA", "CSHH", "CSXX", "CTKI", "DDDE",
 485         "DYBJ", "FQHH", "FXFR", "GEHH", "HVBF", "JTUM", "MIUM", "NHVU", "NQAQ",
 486         "NTHH", "PCHH", "PUUM", "PZPA", "RHZW", "SKIN", "SUHH", "TPTL", "VDVN",
 487         "WKUM", "YDYE", "YUCS", "ZRCD"
 488     };
 489 
 490     /**
 491      * This method computes a set of ISO3166-1 alpha-3 country codes from
 492      * existing isoCountryTable.
 493      */
 494     static Set<String> computeISO3166_1Alpha3Countries() {
 495         int tableLength = isoCountryTable.length();
 496         String[] isoTable = new String[tableLength / 5];
 497         for (int i = 0, index = 0; index < tableLength; i++, index += 5) {
 498             isoTable[i] = isoCountryTable.substring(index + 2, index + 5);
 499         }
 500         return Set.of(isoTable);
 501     }
 502 
 503     private LocaleISOData() {
 504     }
 505 }
< prev index next >