Home
last modified time | relevance | path

Searched refs:UnitWidth (Results 1 – 25 of 36) sorted by relevance

12

/third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/
DPluralRangesTest.java23 import com.ibm.icu.number.NumberFormatter.UnitWidth;
80 …{0.0, 1.0, ULocale.FRANCE, UnitWidth.FULL_NAME, MeasureUnit.FAHRENHEIT, "0–1\u00A0degré Fahrenheit… in TestFormatting()
81 …{1.0, 2.0, ULocale.FRANCE, UnitWidth.FULL_NAME, MeasureUnit.FAHRENHEIT, "1–2\u00A0degrés Fahrenhei… in TestFormatting()
82 … {3.1, 4.25, ULocale.FRANCE, UnitWidth.SHORT, MeasureUnit.FAHRENHEIT, "3,1–4,25\u202F°F"}, in TestFormatting()
83 {3.1, 4.25, ULocale.ENGLISH, UnitWidth.SHORT, MeasureUnit.FAHRENHEIT, "3.1–4.25°F"}, in TestFormatting()
84 {3.1, 4.25, ULocale.CHINESE, UnitWidth.FULL_NAME, MeasureUnit.INCH, "3.1-4.25英寸"}, in TestFormatting()
85 {0.0, 1.0, ULocale.ENGLISH, UnitWidth.FULL_NAME, MeasureUnit.INCH, "0–1 inches"}, in TestFormatting()
87 … {0.0, 1.0, ULocale.ENGLISH, UnitWidth.NARROW, Currency.getInstance("EUR"), "€0.00 – €1.00"}, in TestFormatting()
88 … {0.0, 1.0, ULocale.FRENCH, UnitWidth.NARROW, Currency.getInstance("EUR"), "0,00–1,00 €"}, in TestFormatting()
89 … {0.0, 100.0, ULocale.FRENCH, UnitWidth.NARROW, Currency.getInstance("JPY"), "0–100\u00a0¥"}, in TestFormatting()
[all …]
/third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/number/
DNumberFormatterApiTest.java44 import com.ibm.icu.number.NumberFormatter.UnitWidth;
270 … NumberFormatter.with().notation(Notation.compactShort()).unit(USD).unitWidth(UnitWidth.ISO_CODE), in notationCompact()
286 … NumberFormatter.with().notation(Notation.compactShort()).unit(USD).unitWidth(UnitWidth.FULL_NAME), in notationCompact()
322 … NumberFormatter.with().notation(Notation.compactLong()).unit(USD).unitWidth(UnitWidth.ISO_CODE), in notationCompact()
339 … NumberFormatter.with().notation(Notation.compactLong()).unit(USD).unitWidth(UnitWidth.FULL_NAME), in notationCompact()
534 …ormatter nf = NumberFormatter.with().locale(locale).unit(inputUnit).unitWidth(UnitWidth.FULL_NAME); in unitWithLocaleTags()
573 NumberFormatter.with().unit(MeasureUnit.METER).unitWidth(UnitWidth.FULL_NAME), in unitMeasure()
590 .unitWidth(UnitWidth.FULL_NAME), in unitMeasure()
622 NumberFormatter.with().unitWidth(UnitWidth.FULL_NAME), in unitMeasure()
650 NumberFormatter.with().unit(MeasureUnit.DAY).unitWidth(UnitWidth.FULL_NAME), in unitMeasure()
[all …]
DNumberRangeFormatterTest.java25 import com.ibm.icu.number.NumberFormatter.UnitWidth;
117 …numberFormatterBoth(NumberFormatter.with().unit(MeasureUnit.METER).unitWidth(UnitWidth.FULL_NAME)), in testBasic()
133 …rFormatterBoth(NumberFormatter.with().unit(MeasureUnit.FAHRENHEIT).unitWidth(UnitWidth.FULL_NAME)), in testBasic()
301 .unitWidth(UnitWidth.ISO_CODE) in testCollapse()
321 .unitWidth(UnitWidth.ISO_CODE) in testCollapse()
341 .unitWidth(UnitWidth.ISO_CODE) in testCollapse()
361 .unitWidth(UnitWidth.ISO_CODE) in testCollapse()
633 NumberFormatter.with().unit(MeasureUnit.FAHRENHEIT).unitWidth(UnitWidth.FULL_NAME)), in testIdentity()
718 .unitWidth(UnitWidth.FULL_NAME) in testPlurals()
DMutablePatternModifierTest.java19 import com.ibm.icu.number.NumberFormatter.UnitWidth;
33 UnitWidth.SHORT, in basic()
93 … mod.setSymbols(DecimalFormatSymbols.getInstance(ULocale.ENGLISH), null, UnitWidth.SHORT, null); in mutableEqualsImmutable()
125 UnitWidth.SHORT, in patternWithNoPlaceholder()
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/number/
DNumberFormatterApiTest.java45 import ohos.global.icu.number.NumberFormatter.UnitWidth;
269 … NumberFormatter.with().notation(Notation.compactShort()).unit(USD).unitWidth(UnitWidth.ISO_CODE), in notationCompact()
285 … NumberFormatter.with().notation(Notation.compactShort()).unit(USD).unitWidth(UnitWidth.FULL_NAME), in notationCompact()
321 … NumberFormatter.with().notation(Notation.compactLong()).unit(USD).unitWidth(UnitWidth.ISO_CODE), in notationCompact()
338 … NumberFormatter.with().notation(Notation.compactLong()).unit(USD).unitWidth(UnitWidth.FULL_NAME), in notationCompact()
504 NumberFormatter.with().unit(MeasureUnit.METER).unitWidth(UnitWidth.FULL_NAME), in unitMeasure()
521 .unitWidth(UnitWidth.FULL_NAME), in unitMeasure()
537 NumberFormatter.with().unitWidth(UnitWidth.FULL_NAME), in unitMeasure()
565 NumberFormatter.with().unit(MeasureUnit.DAY).unitWidth(UnitWidth.FULL_NAME), in unitMeasure()
575 NumberFormatter.with().unit(MeasureUnit.DAY).unitWidth(UnitWidth.NARROW), in unitMeasure()
[all …]
DNumberRangeFormatterTest.java26 import ohos.global.icu.number.NumberFormatter.UnitWidth;
119 …numberFormatterBoth(NumberFormatter.with().unit(MeasureUnit.METER).unitWidth(UnitWidth.FULL_NAME)), in testBasic()
135 …rFormatterBoth(NumberFormatter.with().unit(MeasureUnit.FAHRENHEIT).unitWidth(UnitWidth.FULL_NAME)), in testBasic()
303 .unitWidth(UnitWidth.ISO_CODE) in testCollapse()
323 .unitWidth(UnitWidth.ISO_CODE) in testCollapse()
343 .unitWidth(UnitWidth.ISO_CODE) in testCollapse()
363 .unitWidth(UnitWidth.ISO_CODE) in testCollapse()
635 NumberFormatter.with().unit(MeasureUnit.FAHRENHEIT).unitWidth(UnitWidth.FULL_NAME)), in testIdentity()
682 .unitWidth(UnitWidth.FULL_NAME) in testPlurals()
DMutablePatternModifierTest.java20 import ohos.global.icu.number.NumberFormatter.UnitWidth;
36 UnitWidth.SHORT, in basic()
91 … mod.setSymbols(DecimalFormatSymbols.getInstance(ULocale.ENGLISH), null, UnitWidth.SHORT, null); in mutableEqualsImmutable()
123 UnitWidth.SHORT, in patternWithNoPlaceholder()
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/impl/number/
DLongNameHandler.java17 import ohos.global.icu.number.NumberFormatter.UnitWidth;
89 UnitWidth width, in getMeasureData()
97 if (width == UnitWidth.NARROW) { in getMeasureData()
99 } else if (width == UnitWidth.SHORT) { in getMeasureData()
140 private static String getPerUnitFormat(ULocale locale, UnitWidth width) { in getPerUnitFormat()
146 if (width == UnitWidth.NARROW) { in getPerUnitFormat()
148 } else if (width == UnitWidth.SHORT) { in getPerUnitFormat()
177 public static String getUnitDisplayName(ULocale locale, MeasureUnit unit, UnitWidth width) { in getUnitDisplayName()
202 UnitWidth width, in forMeasureUnit()
230 UnitWidth width, in forCompoundUnit()
DMutablePatternModifier.java10 import ohos.global.icu.number.NumberFormatter.UnitWidth;
50 UnitWidth unitWidth;
116 UnitWidth unitWidth, in setSymbols()
404 if (unitWidth == UnitWidth.ISO_CODE) { in getSymbol()
406 } else if (unitWidth == UnitWidth.HIDDEN) { in getSymbol()
DMacroProps.java13 import ohos.global.icu.number.NumberFormatter.UnitWidth;
33 public UnitWidth unitWidth;
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/text/
DMeasureFormat.java48 import ohos.global.icu.number.NumberFormatter.UnitWidth;
158 WIDE(ListFormatter.Style.UNIT, UnitWidth.FULL_NAME, UnitWidth.FULL_NAME),
163 SHORT(ListFormatter.Style.UNIT_SHORT, UnitWidth.SHORT, UnitWidth.ISO_CODE),
168 NARROW(ListFormatter.Style.UNIT_NARROW, UnitWidth.NARROW, UnitWidth.SHORT),
175 NUMERIC(ListFormatter.Style.UNIT_NARROW, UnitWidth.NARROW, UnitWidth.SHORT),
185 DEFAULT_CURRENCY(ListFormatter.Style.UNIT, UnitWidth.FULL_NAME, UnitWidth.SHORT);
193 final UnitWidth unitWidth;
199 final UnitWidth currencyWidth;
201 … private FormatWidth(ListFormatter.Style style, UnitWidth unitWidth, UnitWidth currencyWidth) { in FormatWidth()
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
DMeasureFormat.java47 import com.ibm.icu.number.NumberFormatter.UnitWidth;
163 WIDE(ListFormatter.Width.WIDE, UnitWidth.FULL_NAME, UnitWidth.FULL_NAME),
170 SHORT(ListFormatter.Width.SHORT, UnitWidth.SHORT, UnitWidth.ISO_CODE),
177 NARROW(ListFormatter.Width.NARROW, UnitWidth.NARROW, UnitWidth.SHORT),
186 NUMERIC(ListFormatter.Width.NARROW, UnitWidth.NARROW, UnitWidth.SHORT),
196 DEFAULT_CURRENCY(ListFormatter.Width.SHORT, UnitWidth.FULL_NAME, UnitWidth.SHORT);
204 final UnitWidth unitWidth;
210 final UnitWidth currencyWidth;
214 UnitWidth unitWidth, in FormatWidth()
215 UnitWidth currencyWidth) { in FormatWidth()
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/number/
DLongNameHandler.java21 import com.ibm.icu.number.NumberFormatter.UnitWidth;
271 UnitWidth width, in getInflectedMeasureData()
281 if (width == UnitWidth.NARROW) { in getInflectedMeasureData()
283 } else if (width == UnitWidth.SHORT) { in getInflectedMeasureData()
291 if (width == UnitWidth.SHORT) { in getInflectedMeasureData()
351 UnitWidth width, in getMeasureData()
383 if (width != UnitWidth.FULL_NAME) { in getMeasureData()
397 if (width == UnitWidth.NARROW) { in getMeasureData()
399 } else if (width == UnitWidth.SHORT) { in getMeasureData()
408 if (width == UnitWidth.FULL_NAME in getMeasureData()
[all …]
DMutablePatternModifier.java9 import com.ibm.icu.number.NumberFormatter.UnitWidth;
49 UnitWidth unitWidth;
118 UnitWidth unitWidth, in setSymbols()
429 if (unitWidth == UnitWidth.ISO_CODE) { in getCurrencySymbolForUnitWidth()
431 } else if (unitWidth == UnitWidth.HIDDEN) { in getCurrencySymbolForUnitWidth()
DMixedUnitLongNameHandler.java61 NumberFormatter.UnitWidth width, in forMeasureUnit()
88 if (width == NumberFormatter.UnitWidth.NARROW) { in forMeasureUnit()
90 } else if (width == NumberFormatter.UnitWidth.FULL_NAME) { in forMeasureUnit()
DMacroProps.java12 import com.ibm.icu.number.NumberFormatter.UnitWidth;
29 public UnitWidth unitWidth;
DLongNameMultiplexer.java47 NumberFormatter.UnitWidth width, in forMeasureUnits()
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/number/
DNumberFormatterImpl.java27 import ohos.global.icu.number.NumberFormatter.UnitWidth;
192 UnitWidth unitWidth = UnitWidth.SHORT; in macrosToMicroGenerator()
197 (unitWidth == UnitWidth.FULL_NAME || !(isPercent || isPermille)); in macrosToMicroGenerator()
232 } else if (!isCurrency || unitWidth == UnitWidth.FULL_NAME) { in macrosToMicroGenerator()
350 } else if (isCurrency && unitWidth == UnitWidth.FULL_NAME) { in macrosToMicroGenerator()
368 && macros.unitWidth != UnitWidth.FULL_NAME) ? CompactType.CURRENCY in macrosToMicroGenerator()
DNumberFormatterSettings.java13 import ohos.global.icu.number.NumberFormatter.UnitWidth;
389 public T unitWidth(UnitWidth style) { in unitWidth()
594 macros.unitWidth = (UnitWidth) current.value; in resolve()
DNumberSkeletonImpl.java19 import ohos.global.icu.number.NumberFormatter.UnitWidth;
313 private static UnitWidth unitWidth(StemEnum stem) { in unitWidth()
316 return UnitWidth.NARROW; in unitWidth()
318 return UnitWidth.SHORT; in unitWidth()
320 return UnitWidth.FULL_NAME; in unitWidth()
322 return UnitWidth.ISO_CODE; in unitWidth()
324 return UnitWidth.FORMAL; in unitWidth()
326 return UnitWidth.VARIANT; in unitWidth()
328 return UnitWidth.HIDDEN; in unitWidth()
426 private static void unitWidth(UnitWidth value, StringBuilder sb) { in unitWidth()
[all …]
DNumberFormatter.java89 public static enum UnitWidth { enum in NumberFormatter
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/number/
DNumberFormatterImpl.java32 import com.ibm.icu.number.NumberFormatter.UnitWidth;
200 UnitWidth unitWidth = UnitWidth.SHORT; in macrosToMicroGenerator()
212 && (unitWidth == UnitWidth.FULL_NAME in macrosToMicroGenerator()
256 } else if (!isCurrency || unitWidth == UnitWidth.FULL_NAME) { in macrosToMicroGenerator()
445 } else if (isCurrency && unitWidth == UnitWidth.FULL_NAME) { in macrosToMicroGenerator()
463 && macros.unitWidth != UnitWidth.FULL_NAME) ? CompactType.CURRENCY in macrosToMicroGenerator()
DNumberFormatterSettings.java12 import com.ibm.icu.number.NumberFormatter.UnitWidth;
407 public T unitWidth(UnitWidth style) { in unitWidth()
696 macros.unitWidth = (UnitWidth) current.value; in resolve()
DNumberSkeletonImpl.java20 import com.ibm.icu.number.NumberFormatter.UnitWidth;
328 private static UnitWidth unitWidth(StemEnum stem) { in unitWidth()
331 return UnitWidth.NARROW; in unitWidth()
333 return UnitWidth.SHORT; in unitWidth()
335 return UnitWidth.FULL_NAME; in unitWidth()
337 return UnitWidth.ISO_CODE; in unitWidth()
339 return UnitWidth.FORMAL; in unitWidth()
341 return UnitWidth.VARIANT; in unitWidth()
343 return UnitWidth.HIDDEN; in unitWidth()
445 private static void unitWidth(UnitWidth value, StringBuilder sb) { in unitWidth()
[all …]
DNumberFormatter.java149 public static enum UnitWidth { enum in NumberFormatter

12