Home | History | Annotate | Download | only in phonenumbers
      1 /*
      2  * Copyright (C) 2010 The Libphonenumber Authors
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  * http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 /* This file is automatically generated by {@link BuildMetadataProtoFromXml}.
     18  * Please don't modify it directly.
     19  */
     20 
     21 package com.google.i18n.phonenumbers;
     22 
     23 import java.util.ArrayList;
     24 import java.util.HashMap;
     25 import java.util.List;
     26 import java.util.Map;
     27 
     28 public class CountryCodeToRegionCodeMapForTesting {
     29   // A mapping from a country code to the region codes which denote the
     30   // country/region represented by that country code. In the case of multiple
     31   // countries sharing a calling code, such as the NANPA countries, the one
     32   // indicated with "isMainCountryForCode" in the metadata should be first.
     33   static Map<Integer, List<String>> getCountryCodeToRegionCodeMap() {
     34     // The capacity is set to 38 as there are 29 different entries,
     35     // and this offers a load factor of roughly 0.75.
     36     Map<Integer, List<String>> countryCodeToRegionCodeMap =
     37         new HashMap<Integer, List<String>>(38);
     38 
     39     ArrayList<String> listWithRegionCode;
     40 
     41     listWithRegionCode = new ArrayList<String>(4);
     42     listWithRegionCode.add("US");
     43     listWithRegionCode.add("BB");
     44     listWithRegionCode.add("BS");
     45     listWithRegionCode.add("CA");
     46     countryCodeToRegionCodeMap.put(1, listWithRegionCode);
     47 
     48     listWithRegionCode = new ArrayList<String>(1);
     49     listWithRegionCode.add("RU");
     50     countryCodeToRegionCodeMap.put(7, listWithRegionCode);
     51 
     52     listWithRegionCode = new ArrayList<String>(1);
     53     listWithRegionCode.add("FR");
     54     countryCodeToRegionCodeMap.put(33, listWithRegionCode);
     55 
     56     listWithRegionCode = new ArrayList<String>(1);
     57     listWithRegionCode.add("HU");
     58     countryCodeToRegionCodeMap.put(36, listWithRegionCode);
     59 
     60     listWithRegionCode = new ArrayList<String>(1);
     61     listWithRegionCode.add("IT");
     62     countryCodeToRegionCodeMap.put(39, listWithRegionCode);
     63 
     64     listWithRegionCode = new ArrayList<String>(2);
     65     listWithRegionCode.add("GB");
     66     listWithRegionCode.add("GG");
     67     countryCodeToRegionCodeMap.put(44, listWithRegionCode);
     68 
     69     listWithRegionCode = new ArrayList<String>(1);
     70     listWithRegionCode.add("SE");
     71     countryCodeToRegionCodeMap.put(46, listWithRegionCode);
     72 
     73     listWithRegionCode = new ArrayList<String>(1);
     74     listWithRegionCode.add("PL");
     75     countryCodeToRegionCodeMap.put(48, listWithRegionCode);
     76 
     77     listWithRegionCode = new ArrayList<String>(1);
     78     listWithRegionCode.add("DE");
     79     countryCodeToRegionCodeMap.put(49, listWithRegionCode);
     80 
     81     listWithRegionCode = new ArrayList<String>(1);
     82     listWithRegionCode.add("MX");
     83     countryCodeToRegionCodeMap.put(52, listWithRegionCode);
     84 
     85     listWithRegionCode = new ArrayList<String>(1);
     86     listWithRegionCode.add("AR");
     87     countryCodeToRegionCodeMap.put(54, listWithRegionCode);
     88 
     89     listWithRegionCode = new ArrayList<String>(1);
     90     listWithRegionCode.add("BR");
     91     countryCodeToRegionCodeMap.put(55, listWithRegionCode);
     92 
     93     listWithRegionCode = new ArrayList<String>(3);
     94     listWithRegionCode.add("AU");
     95     listWithRegionCode.add("CC");
     96     listWithRegionCode.add("CX");
     97     countryCodeToRegionCodeMap.put(61, listWithRegionCode);
     98 
     99     listWithRegionCode = new ArrayList<String>(1);
    100     listWithRegionCode.add("NZ");
    101     countryCodeToRegionCodeMap.put(64, listWithRegionCode);
    102 
    103     listWithRegionCode = new ArrayList<String>(1);
    104     listWithRegionCode.add("SG");
    105     countryCodeToRegionCodeMap.put(65, listWithRegionCode);
    106 
    107     listWithRegionCode = new ArrayList<String>(1);
    108     listWithRegionCode.add("JP");
    109     countryCodeToRegionCodeMap.put(81, listWithRegionCode);
    110 
    111     listWithRegionCode = new ArrayList<String>(1);
    112     listWithRegionCode.add("KR");
    113     countryCodeToRegionCodeMap.put(82, listWithRegionCode);
    114 
    115     listWithRegionCode = new ArrayList<String>(1);
    116     listWithRegionCode.add("CN");
    117     countryCodeToRegionCodeMap.put(86, listWithRegionCode);
    118 
    119     listWithRegionCode = new ArrayList<String>(1);
    120     listWithRegionCode.add("AO");
    121     countryCodeToRegionCodeMap.put(244, listWithRegionCode);
    122 
    123     listWithRegionCode = new ArrayList<String>(2);
    124     listWithRegionCode.add("RE");
    125     listWithRegionCode.add("YT");
    126     countryCodeToRegionCodeMap.put(262, listWithRegionCode);
    127 
    128     listWithRegionCode = new ArrayList<String>(1);
    129     listWithRegionCode.add("TA");
    130     countryCodeToRegionCodeMap.put(290, listWithRegionCode);
    131 
    132     listWithRegionCode = new ArrayList<String>(1);
    133     listWithRegionCode.add("AM");
    134     countryCodeToRegionCodeMap.put(374, listWithRegionCode);
    135 
    136     listWithRegionCode = new ArrayList<String>(1);
    137     listWithRegionCode.add("BY");
    138     countryCodeToRegionCodeMap.put(375, listWithRegionCode);
    139 
    140     listWithRegionCode = new ArrayList<String>(1);
    141     listWithRegionCode.add("AD");
    142     countryCodeToRegionCodeMap.put(376, listWithRegionCode);
    143 
    144     listWithRegionCode = new ArrayList<String>(1);
    145     listWithRegionCode.add("001");
    146     countryCodeToRegionCodeMap.put(800, listWithRegionCode);
    147 
    148     listWithRegionCode = new ArrayList<String>(1);
    149     listWithRegionCode.add("001");
    150     countryCodeToRegionCodeMap.put(882, listWithRegionCode);
    151 
    152     listWithRegionCode = new ArrayList<String>(1);
    153     listWithRegionCode.add("AE");
    154     countryCodeToRegionCodeMap.put(971, listWithRegionCode);
    155 
    156     listWithRegionCode = new ArrayList<String>(1);
    157     listWithRegionCode.add("001");
    158     countryCodeToRegionCodeMap.put(979, listWithRegionCode);
    159 
    160     listWithRegionCode = new ArrayList<String>(1);
    161     listWithRegionCode.add("UZ");
    162     countryCodeToRegionCodeMap.put(998, listWithRegionCode);
    163 
    164     return countryCodeToRegionCodeMap;
    165   }
    166 }
    167