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
21package com.android.i18n.phonenumbers;
22
23import java.util.ArrayList;
24import java.util.HashMap;
25import java.util.List;
26import java.util.Map;
27
28public 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 24 as there are 18 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>>(24);
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("BR");
72    countryCodeToRegionCodeMap.put(55, listWithRegionCode);
73
74    listWithRegionCode = new ArrayList<String>(1);
75    listWithRegionCode.add("AU");
76    countryCodeToRegionCodeMap.put(61, listWithRegionCode);
77
78    listWithRegionCode = new ArrayList<String>(1);
79    listWithRegionCode.add("NZ");
80    countryCodeToRegionCodeMap.put(64, listWithRegionCode);
81
82    listWithRegionCode = new ArrayList<String>(1);
83    listWithRegionCode.add("SG");
84    countryCodeToRegionCodeMap.put(65, listWithRegionCode);
85
86    listWithRegionCode = new ArrayList<String>(1);
87    listWithRegionCode.add("JP");
88    countryCodeToRegionCodeMap.put(81, listWithRegionCode);
89
90    listWithRegionCode = new ArrayList<String>(1);
91    listWithRegionCode.add("KR");
92    countryCodeToRegionCodeMap.put(82, listWithRegionCode);
93
94    listWithRegionCode = new ArrayList<String>(1);
95    listWithRegionCode.add("AO");
96    countryCodeToRegionCodeMap.put(244, listWithRegionCode);
97
98    listWithRegionCode = new ArrayList<String>(2);
99    listWithRegionCode.add("RE");
100    listWithRegionCode.add("YT");
101    countryCodeToRegionCodeMap.put(262, listWithRegionCode);
102
103    listWithRegionCode = new ArrayList<String>(1);
104    listWithRegionCode.add("AD");
105    countryCodeToRegionCodeMap.put(376, listWithRegionCode);
106
107    listWithRegionCode = new ArrayList<String>(1);
108    listWithRegionCode.add("001");
109    countryCodeToRegionCodeMap.put(800, listWithRegionCode);
110
111    listWithRegionCode = new ArrayList<String>(1);
112    listWithRegionCode.add("001");
113    countryCodeToRegionCodeMap.put(979, listWithRegionCode);
114
115    return countryCodeToRegionCodeMap;
116  }
117}
118