1 package org.unicode.cldr.unittest;
2 
3 import org.unicode.cldr.util.CLDRConfig;
4 import org.unicode.cldr.util.SupplementalDataInfo;
5 
6 import com.ibm.icu.impl.Row.R4;
7 import com.ibm.icu.util.LocaleMatcher.LanguageMatcherData;
8 
9 public class LocaleMatcherShim {
10     private static final CLDRConfig CONFIG = CLDRConfig.getInstance();
11 
12     static final SupplementalDataInfo INFO = CONFIG.getSupplementalDataInfo();
13     static final LanguageMatcherData LANGUAGE_MATCHER_DATA = new LanguageMatcherData();
14     static {
15         for (R4<String, String, Integer, Boolean> foo : INFO.getLanguageMatcherData("written")) {
foo.get2()16             LANGUAGE_MATCHER_DATA.addDistance(foo.get0(), foo.get1(), foo.get2(), foo.get3());
17         }
LANGUAGE_MATCHER_DATA.freeze()18         LANGUAGE_MATCHER_DATA.freeze();
19     }
20 
load()21     public static LanguageMatcherData load() {
22         return LANGUAGE_MATCHER_DATA;
23     }
24 }
25