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.android.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 30 as there are 23 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>>(30);
     38 
     39     ArrayList<String> listWithRegionCode;
     40 
     41     listWithRegionCode = new ArrayList<String>(2);
     42     listWithRegionCode.add("US");
     43     listWithRegionCode.add("BS");
     44     countryCodeToRegionCodeMap.put(1, listWithRegionCode);
     45 
     46     listWithRegionCode = new ArrayList<String>(1);
     47     listWithRegionCode.add("FR");
     48     countryCodeToRegionCodeMap.put(33, listWithRegionCode);
     49 
     50     listWithRegionCode = new ArrayList<String>(1);
     51     listWithRegionCode.add("HU");
     52     countryCodeToRegionCodeMap.put(36, listWithRegionCode);
     53 
     54     listWithRegionCode = new ArrayList<String>(1);
     55     listWithRegionCode.add("IT");
     56     countryCodeToRegionCodeMap.put(39, listWithRegionCode);
     57 
     58     listWithRegionCode = new ArrayList<String>(2);
     59     listWithRegionCode.add("GB");
     60     listWithRegionCode.add("GG");
     61     countryCodeToRegionCodeMap.put(44, listWithRegionCode);
     62 
     63     listWithRegionCode = new ArrayList<String>(1);
     64     listWithRegionCode.add("PL");
     65     countryCodeToRegionCodeMap.put(48, listWithRegionCode);
     66 
     67     listWithRegionCode = new ArrayList<String>(1);
     68     listWithRegionCode.add("DE");
     69     countryCodeToRegionCodeMap.put(49, listWithRegionCode);
     70 
     71     listWithRegionCode = new ArrayList<String>(1);
     72     listWithRegionCode.add("MX");
     73     countryCodeToRegionCodeMap.put(52, listWithRegionCode);
     74 
     75     listWithRegionCode = new ArrayList<String>(1);
     76     listWithRegionCode.add("AR");
     77     countryCodeToRegionCodeMap.put(54, listWithRegionCode);
     78 
     79     listWithRegionCode = new ArrayList<String>(1);
     80     listWithRegionCode.add("BR");
     81     countryCodeToRegionCodeMap.put(55, listWithRegionCode);
     82 
     83     listWithRegionCode = new ArrayList<String>(3);
     84     listWithRegionCode.add("AU");
     85     listWithRegionCode.add("CC");
     86     listWithRegionCode.add("CX");
     87     countryCodeToRegionCodeMap.put(61, listWithRegionCode);
     88 
     89     listWithRegionCode = new ArrayList<String>(1);
     90     listWithRegionCode.add("NZ");
     91     countryCodeToRegionCodeMap.put(64, listWithRegionCode);
     92 
     93     listWithRegionCode = new ArrayList<String>(1);
     94     listWithRegionCode.add("SG");
     95     countryCodeToRegionCodeMap.put(65, listWithRegionCode);
     96 
     97     listWithRegionCode = new ArrayList<String>(1);
     98     listWithRegionCode.add("JP");
     99     countryCodeToRegionCodeMap.put(81, listWithRegionCode);
    100 
    101     listWithRegionCode = new ArrayList<String>(1);
    102     listWithRegionCode.add("KR");
    103     countryCodeToRegionCodeMap.put(82, listWithRegionCode);
    104 
    105     listWithRegionCode = new ArrayList<String>(1);
    106     listWithRegionCode.add("CN");
    107     countryCodeToRegionCodeMap.put(86, listWithRegionCode);
    108 
    109     listWithRegionCode = new ArrayList<String>(1);
    110     listWithRegionCode.add("AO");
    111     countryCodeToRegionCodeMap.put(244, listWithRegionCode);
    112 
    113     listWithRegionCode = new ArrayList<String>(2);
    114     listWithRegionCode.add("RE");
    115     listWithRegionCode.add("YT");
    116     countryCodeToRegionCodeMap.put(262, listWithRegionCode);
    117 
    118     listWithRegionCode = new ArrayList<String>(1);
    119     listWithRegionCode.add("BY");
    120     countryCodeToRegionCodeMap.put(375, listWithRegionCode);
    121 
    122     listWithRegionCode = new ArrayList<String>(1);
    123     listWithRegionCode.add("AD");
    124     countryCodeToRegionCodeMap.put(376, listWithRegionCode);
    125 
    126     listWithRegionCode = new ArrayList<String>(1);
    127     listWithRegionCode.add("001");
    128     countryCodeToRegionCodeMap.put(800, listWithRegionCode);
    129 
    130     listWithRegionCode = new ArrayList<String>(1);
    131     listWithRegionCode.add("AE");
    132     countryCodeToRegionCodeMap.put(971, listWithRegionCode);
    133 
    134     listWithRegionCode = new ArrayList<String>(1);
    135     listWithRegionCode.add("001");
    136     countryCodeToRegionCodeMap.put(979, listWithRegionCode);
    137 
    138     return countryCodeToRegionCodeMap;
    139   }
    140 }
    141