Home
last modified time | relevance | path

Searched refs:variant (Results 1 – 15 of 15) sorted by relevance

/libcore/ojluni/src/main/java/sun/util/locale/
DBaseLocale.java46 private final String variant; field in BaseLocale
55 this.variant = ""; in BaseLocale()
58 private BaseLocale(String language, String script, String region, String variant) { in BaseLocale() argument
62 this.variant = (variant != null) ? variant.intern() : ""; in BaseLocale()
74 String region, String variant) { in getInstance() argument
86 Key key = new Key(language, script, region, variant); in getInstance()
104 return variant; in getVariant()
119 && variant == other.variant; in equals()
143 if (variant.length() > 0) { in toString()
148 buf.append(variant); in toString()
[all …]
DInternalLocaleBuilder.java49 private String variant = ""; field in InternalLocaleBuilder
95 public InternalLocaleBuilder setVariant(String variant) throws LocaleSyntaxException { in setVariant() argument
96 if (LocaleUtils.isEmpty(variant)) { in setVariant()
97 this.variant = ""; in setVariant()
100 String var = variant.replaceAll(LanguageTag.SEP, BaseLocale.SEP); in setVariant()
103 throw new LocaleSyntaxException("Ill-formed variant: " + variant, errIdx); in setVariant()
105 this.variant = var; in setVariant()
368 variant = var.toString(); in setLanguageTag()
380 String variant = base.getVariant(); in setLocale() local
385 if (language.equals("ja") && region.equals("JP") && variant.equals("JP")) { in setLocale()
[all …]
DLanguageTag.java422 String variant = baseLocale.getVariant(); in parseLocale() local
451 if (tag.language.equals("no") && tag.region.equals("NO") && variant.equals("NY")) { in parseLocale()
453 variant = ""; in parseLocale()
456 if (variant.length() > 0) { in parseLocale()
458 StringTokenIterator varitr = new StringTokenIterator(variant, BaseLocale.SEP); in parseLocale()
732 for (String variant : variants) { in toString()
733 sb.append(SEP).append(variant); in toString()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DUUIDTest.java33 assertEquals(2, uuid.variant()); in test_ConstructorJJ()
88 assertEquals(0, uuid.variant()); in test_variant()
90 assertEquals(0, uuid.variant()); in test_variant()
92 assertEquals(0, uuid.variant()); in test_variant()
94 assertEquals(0, uuid.variant()); in test_variant()
97 assertEquals(2, uuid.variant()); in test_variant()
99 assertEquals(2, uuid.variant()); in test_variant()
101 assertEquals(2, uuid.variant()); in test_variant()
103 assertEquals(2, uuid.variant()); in test_variant()
106 assertEquals(6, uuid.variant()); in test_variant()
[all …]
/libcore/ojluni/src/main/java/java/util/
DCurrency.java367 String variant = locale.getVariant(); in getInstance() local
368 if (!variant.isEmpty() && (variant.equals("EURO") || variant.equals("HK") || in getInstance()
369 variant.equals("PREEURO"))) { in getInstance()
370 country = country + "_" + variant; in getInstance()
DLocale.java736 public Locale(String language, String country, String variant) { in Locale() argument
737 if (language== null || country == null || variant == null) { in Locale()
740 baseLocale = BaseLocale.getInstance(convertOldISOCodes(language), "", country, variant); in Locale()
741 localeExtensions = getCompatibilityExtensions(language, "", country, variant); in Locale()
817 static Locale getInstance(String language, String country, String variant) { in getInstance() argument
818 return getInstance(language, "", country, variant, null); in getInstance()
822 String variant, LocaleExtensions extensions) { in getInstance() argument
823 if (language== null || script == null || country == null || variant == null) { in getInstance()
828 extensions = getCompatibilityExtensions(language, script, country, variant); in getInstance()
831 BaseLocale baseloc = BaseLocale.getInstance(language, script, country, variant); in getInstance()
[all …]
DResourceBundle.java2374 String variant = base.getVariant(); in createObject() local
2380 if (region.equals("NO") && variant.equals("NY")) { in createObject()
2381 variant = ""; in createObject()
2388 List<Locale> tmpList = getDefaultList("nb", script, region, variant); in createObject()
2402 List<Locale> nynorskList = getDefaultList("nn", script, region, variant); in createObject()
2439 return getDefaultList(language, script, region, variant); in createObject()
2442 …static List<Locale> getDefaultList(String language, String script, String region, String variant) { in getDefaultList() argument
2445 if (variant.length() > 0) { in getDefaultList()
2447 int idx = variant.length(); in getDefaultList()
2449 variants.add(variant.substring(0, idx)); in getDefaultList()
[all …]
DUUID.java265 public int variant() { in variant() method in UUID
/libcore/ojluni/annotations/hiddenapi/java/util/
DUUID.java65 public int variant() { in variant() method in UUID
DLocale.java54 public Locale(java.lang.String language, java.lang.String country, java.lang.String variant) { in Locale() argument
73 java.lang.String language, java.lang.String country, java.lang.String variant) { in getInstance() argument
81 java.lang.String variant, in getInstance() argument
256 private static java.lang.String normalizeAndValidateVariant(java.lang.String variant) { in normalizeAndValidateVariant() argument
321 java.lang.String variant) { in getCompatibilityExtensions() argument
570 public java.util.Locale.Builder setVariant(java.lang.String variant) { in setVariant() argument
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DNumberFormatTest.java177 String variant = (format.toPattern().indexOf(';') > 0) ? "#,##0;-#,##0" : "#,##0"; in test_getIntegerInstanceLjava_util_Locale() local
180 variant, format.toPattern()); in test_getIntegerInstanceLjava_util_Locale()
DSimpleDateFormatTest.java938 for (String variant: variants) { in parse_whitespace_variants()
940 String info = String.format("Parsing variant='%s', c=0x%x:", variant, (int) c); in parse_whitespace_variants()
941 String input = String.format(variant, c); in parse_whitespace_variants()
953 String info = String.format("Parsing variant='%s', c=0x%x:", variant, (int) c); in parse_whitespace_variants()
954 String input = String.format(variant, c); in parse_whitespace_variants()
/libcore/ojluni/src/main/resources/
Dhijrah-config-umalqura.properties24 # This properties file defines a Hijrah calendar variant.
/libcore/ojluni/annotations/sdk/nullability/java/util/
DLocale.annotated.java53 …NonNull java.lang.String country, @libcore.util.NonNull java.lang.String variant) { throw new Runt… in Locale() argument
228 …a.util.Locale.Builder setVariant(@libcore.util.Nullable java.lang.String variant) { throw new Runt… in setVariant() argument
/libcore/luni/src/test/java/libcore/java/text/
DOldNumberFormatTest.java52 String variant = (format.toPattern().indexOf(';') > 0) ? "#,##0;-#,##0" : "#,##0"; in test_getIntegerInstanceLjava_util_Locale() local
53 assertEquals(variant, format.toPattern()); in test_getIntegerInstanceLjava_util_Locale()