Home | History | Annotate | Download | only in phonenumbers
      1 /*
      2  * Copyright (C) 2010 Google Inc.
      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 20 as there are 15 different country codes,
     35     // and this offers a load factor of roughly 0.75.
     36     Map<Integer, List<String>> countryCodeToRegionCodeMap =
     37         new HashMap<Integer, List<String>>(20);
     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("IT");
     48     countryCodeToRegionCodeMap.put(39, listWithRegionCode);
     49 
     50     listWithRegionCode = new ArrayList<String>(1);
     51     listWithRegionCode.add("GB");
     52     countryCodeToRegionCodeMap.put(44, listWithRegionCode);
     53 
     54     listWithRegionCode = new ArrayList<String>(1);
     55     listWithRegionCode.add("PL");
     56     countryCodeToRegionCodeMap.put(48, listWithRegionCode);
     57 
     58     listWithRegionCode = new ArrayList<String>(1);
     59     listWithRegionCode.add("DE");
     60     countryCodeToRegionCodeMap.put(49, listWithRegionCode);
     61 
     62     listWithRegionCode = new ArrayList<String>(1);
     63     listWithRegionCode.add("MX");
     64     countryCodeToRegionCodeMap.put(52, listWithRegionCode);
     65 
     66     listWithRegionCode = new ArrayList<String>(1);
     67     listWithRegionCode.add("AR");
     68     countryCodeToRegionCodeMap.put(54, listWithRegionCode);
     69 
     70     listWithRegionCode = new ArrayList<String>(1);
     71     listWithRegionCode.add("AU");
     72     countryCodeToRegionCodeMap.put(61, listWithRegionCode);
     73 
     74     listWithRegionCode = new ArrayList<String>(1);
     75     listWithRegionCode.add("NZ");
     76     countryCodeToRegionCodeMap.put(64, listWithRegionCode);
     77 
     78     listWithRegionCode = new ArrayList<String>(1);
     79     listWithRegionCode.add("SG");
     80     countryCodeToRegionCodeMap.put(65, listWithRegionCode);
     81 
     82     listWithRegionCode = new ArrayList<String>(1);
     83     listWithRegionCode.add("JP");
     84     countryCodeToRegionCodeMap.put(81, listWithRegionCode);
     85 
     86     listWithRegionCode = new ArrayList<String>(1);
     87     listWithRegionCode.add("KR");
     88     countryCodeToRegionCodeMap.put(82, listWithRegionCode);
     89 
     90     listWithRegionCode = new ArrayList<String>(1);
     91     listWithRegionCode.add("AO");
     92     countryCodeToRegionCodeMap.put(244, listWithRegionCode);
     93 
     94     listWithRegionCode = new ArrayList<String>(2);
     95     listWithRegionCode.add("RE");
     96     listWithRegionCode.add("YT");
     97     countryCodeToRegionCodeMap.put(262, listWithRegionCode);
     98 
     99     listWithRegionCode = new ArrayList<String>(1);
    100     listWithRegionCode.add("AD");
    101     countryCodeToRegionCodeMap.put(376, listWithRegionCode);
    102 
    103     return countryCodeToRegionCodeMap;
    104   }
    105 }
    106