Home
last modified time | relevance | path

Searched refs:LanguageRange (Results 1 – 4 of 4) sorted by relevance

/libcore/luni/src/test/java/libcore/java/util/
DLocaleLanguageRangeTest.java19 import static java.util.Locale.LanguageRange.MAX_WEIGHT;
26 import java.util.Locale.LanguageRange;
41 assertEquals(0.0, LanguageRange.MIN_WEIGHT); in testWeight_constantValues()
46 assertEquals(MAX_WEIGHT, new LanguageRange("de-DE").getWeight()); in testConstructor_defaultsToMaxWeight()
51 new LanguageRange("de-DE", -0.00000001); in testConstructor_invalidWeight()
57 new LanguageRange("de-DE", 1.00000001); in testConstructor_invalidWeight()
62 new LanguageRange("de-DE", 0); in testConstructor_invalidWeight()
63 new LanguageRange("de-DE", 1); in testConstructor_invalidWeight()
68 new LanguageRange(null); in testConstructor_nullRange()
73 new LanguageRange(null, MAX_WEIGHT); in testConstructor_nullRange()
[all …]
DLocaleTest.java38 import java.util.Locale.LanguageRange;
800 List<LanguageRange> ranges = new ArrayList<>(); in test_filter_basic()
801 ranges.add(new LanguageRange("en-US")); in test_filter_basic()
815 ranges.add(new LanguageRange("zh-Hant-TW")); in test_filter_basic()
835 List<LanguageRange> priorityList = languageRangesOf("de-DE", "de-*-DE"); in test_filter_extended()
940 List<LanguageRange> languageRanges = languageRangesOf("en-*-US", "de-DE"); in test_filter_nullArguments()
961 List<LanguageRange> priorityList = languageRangesOf("zh-Hant-TW", "en-US"); in test_filter_priorityOrder()
978 List<LanguageRange> priorityList = languageRangesOf("de-DE", "de-*-DE"); in test_filter_resultIsModifiable_locales()
992 List<LanguageRange> priorityList = languageRangesOf("de-DE", "de-*-DE"); in test_filter_resultIsModifiable_tags()
1252 List<LanguageRange> languageRanges = languageRangesOf( in test_lookup_noMatch()
[all …]
/libcore/ojluni/src/main/java/sun/util/locale/
DLocaleMatcher.java38 import static java.util.Locale.LanguageRange.*;
48 public static List<Locale> filter(List<LanguageRange> priorityList, in filter()
73 public static List<String> filterTags(List<LanguageRange> priorityList, in filterTags()
80 ArrayList<LanguageRange> list; in filterTags()
85 for (LanguageRange lr : priorityList) { in filterTags()
97 list.add(new LanguageRange(range, lr.getWeight())); in filterTags()
112 private static List<String> filterBasic(List<LanguageRange> priorityList, in filterBasic()
115 for (LanguageRange lr : priorityList) { in filterBasic()
136 private static List<String> filterExtended(List<LanguageRange> priorityList, in filterExtended()
139 for (LanguageRange lr : priorityList) { in filterExtended()
[all …]
/libcore/ojluni/src/main/java/java/util/
DLocale.java2996 public static final class LanguageRange { class in Locale
3026 public LanguageRange(String range) { in LanguageRange() method in Locale.LanguageRange
3043 public LanguageRange(String range, double weight) { in LanguageRange() method in Locale.LanguageRange
3182 public static List<LanguageRange> parse(String ranges) { in parse()
3205 public static List<LanguageRange> parse(String ranges, in parse()
3257 public static List<LanguageRange> mapEquivalents( in mapEquivalents()
3258 List<LanguageRange>priorityList, in mapEquivalents()
3296 if (!(obj instanceof LanguageRange)) { in equals()
3299 LanguageRange other = (LanguageRange)obj; in equals()
3325 public static List<Locale> filter(List<LanguageRange> priorityList, in filter()
[all …]