Home
last modified time | relevance | path

Searched refs:NumberFormatter (Results 1 – 25 of 120) sorted by relevance

12345

/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/number/
DNumberFormatterApiTest.java41 import ohos.global.icu.number.NumberFormatter;
42 import ohos.global.icu.number.NumberFormatter.DecimalSeparatorDisplay;
43 import ohos.global.icu.number.NumberFormatter.GroupingStrategy;
44 import ohos.global.icu.number.NumberFormatter.SignDisplay;
45 import ohos.global.icu.number.NumberFormatter.UnitWidth;
83 NumberFormatter.with(), in notationSimple()
99 NumberFormatter.with().notation(Notation.simple()), in notationSimple()
115 NumberFormatter.with(), in notationSimple()
127 NumberFormatter.with().notation(Notation.scientific()), in notationScientific()
143 NumberFormatter.with().notation(Notation.engineering()), in notationScientific()
[all …]
DNumberRangeFormatterTest.java25 import ohos.global.icu.number.NumberFormatter;
26 import ohos.global.icu.number.NumberFormatter.UnitWidth;
86 .numberFormatterBoth(NumberFormatter.with().unit(MeasureUnit.METER)), in testBasic()
102 .numberFormatterFirst(NumberFormatter.with().unit(MeasureUnit.METER)) in testBasic()
103 .numberFormatterSecond(NumberFormatter.with().unit(MeasureUnit.KILOMETER)), in testBasic()
119 ….numberFormatterBoth(NumberFormatter.with().unit(MeasureUnit.METER).unitWidth(UnitWidth.FULL_NAME)… in testBasic()
135 ….numberFormatterBoth(NumberFormatter.with().unit(MeasureUnit.FAHRENHEIT).unitWidth(UnitWidth.FULL_… in testBasic()
167 .numberFormatterBoth(NumberFormatter.with().unit(MeasureUnit.KELVIN)), in testBasic()
199 .numberFormatterBoth(NumberFormatter.with().unit(PTE)), in testBasic()
218 .numberFormatterBoth(NumberFormatter.with().unit(USD)), in testCollapse()
[all …]
DNumberSkeletonTest.java14 import ohos.global.icu.number.NumberFormatter;
126 NumberFormatter.forSkeleton(cas); in validTokens()
195 NumberFormatter.forSkeleton(cas); in invalidTokens()
216 NumberFormatter.forSkeleton(cas); in unknownTokens()
235 NumberFormatter.forSkeleton(cas); in unexpectedTokens()
256 NumberFormatter.forSkeleton(cas); in duplicateValues()
280 NumberFormatter.forSkeleton(skeletonString); in stemsRequiringOption()
301 String normalized = NumberFormatter.forSkeleton(skeleton).toSkeleton(); in defaultTokens()
317 … String actual = NumberFormatter.forSkeleton(skeleton).locale(ULocale.ENGLISH).format(5142.3) in flexibleSeparators()
337 String normalized = NumberFormatter.forSkeleton(plus) in wildcardCharacters()
[all …]
DExhaustiveNumberTest.java18 import ohos.global.icu.number.NumberFormatter;
98 UnlocalizedNumberFormatter uNoUnitPercent = NumberFormatter.with().unit(NoUnit.PERCENT); in test20417_PercentParity()
99 UnlocalizedNumberFormatter uNoUnitPermille = NumberFormatter.with().unit(NoUnit.PERMILLE); in test20417_PercentParity()
100 … UnlocalizedNumberFormatter uMeasurePercent = NumberFormatter.with().unit(MeasureUnit.PERCENT); in test20417_PercentParity()
101 … UnlocalizedNumberFormatter uMeasurePermille = NumberFormatter.with().unit(MeasureUnit.PERMILLE); in test20417_PercentParity()
119 String actual = NumberFormatter.withLocale(ULocale.ENGLISH).precision(Precision.unlimited()) in unlimitedRoundingBigDecimal()
/third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/number/
DNumberFormatterApiTest.java38 import com.ibm.icu.number.NumberFormatter;
39 import com.ibm.icu.number.NumberFormatter.DecimalSeparatorDisplay;
40 import com.ibm.icu.number.NumberFormatter.GroupingStrategy;
41 import com.ibm.icu.number.NumberFormatter.RoundingPriority;
42 import com.ibm.icu.number.NumberFormatter.SignDisplay;
43 import com.ibm.icu.number.NumberFormatter.TrailingZeroDisplay;
44 import com.ibm.icu.number.NumberFormatter.UnitWidth;
84 NumberFormatter.with(), in notationSimple()
100 NumberFormatter.with().notation(Notation.simple()), in notationSimple()
116 NumberFormatter.with(), in notationSimple()
[all …]
DNumberRangeFormatterTest.java24 import com.ibm.icu.number.NumberFormatter;
25 import com.ibm.icu.number.NumberFormatter.UnitWidth;
84 .numberFormatterBoth(NumberFormatter.with().unit(MeasureUnit.METER)), in testBasic()
100 .numberFormatterFirst(NumberFormatter.with().unit(MeasureUnit.METER)) in testBasic()
101 .numberFormatterSecond(NumberFormatter.with().unit(MeasureUnit.KILOMETER)), in testBasic()
117 ….numberFormatterBoth(NumberFormatter.with().unit(MeasureUnit.METER).unitWidth(UnitWidth.FULL_NAME)… in testBasic()
133 ….numberFormatterBoth(NumberFormatter.with().unit(MeasureUnit.FAHRENHEIT).unitWidth(UnitWidth.FULL_… in testBasic()
165 .numberFormatterBoth(NumberFormatter.with().unit(MeasureUnit.KELVIN)), in testBasic()
197 .numberFormatterBoth(NumberFormatter.with().unit(PTE)), in testBasic()
216 .numberFormatterBoth(NumberFormatter.with().unit(USD)), in testCollapse()
[all …]
DNumberSkeletonTest.java13 import com.ibm.icu.number.NumberFormatter;
133 NumberFormatter.forSkeleton(cas); in validTokens()
207 NumberFormatter.forSkeleton(cas); in invalidTokens()
228 NumberFormatter.forSkeleton(cas); in unknownTokens()
248 NumberFormatter.forSkeleton(cas); in unexpectedTokens()
269 NumberFormatter.forSkeleton(cas); in duplicateValues()
293 NumberFormatter.forSkeleton(skeletonString); in stemsRequiringOption()
314 String normalized = NumberFormatter.forSkeleton(skeleton).toSkeleton(); in defaultTokens()
330 … String actual = NumberFormatter.forSkeleton(skeleton).locale(ULocale.ENGLISH).format(5142.3) in flexibleSeparators()
349 String normalized = NumberFormatter.forSkeleton(plus) in wildcardCharacters()
[all …]
DExhaustiveNumberTest.java17 import com.ibm.icu.number.NumberFormatter;
97 UnlocalizedNumberFormatter uNoUnitPercent = NumberFormatter.with().unit(NoUnit.PERCENT); in test20417_PercentParity()
98 UnlocalizedNumberFormatter uNoUnitPermille = NumberFormatter.with().unit(NoUnit.PERMILLE); in test20417_PercentParity()
99 … UnlocalizedNumberFormatter uMeasurePercent = NumberFormatter.with().unit(MeasureUnit.PERCENT); in test20417_PercentParity()
100 … UnlocalizedNumberFormatter uMeasurePermille = NumberFormatter.with().unit(MeasureUnit.PERMILLE); in test20417_PercentParity()
118 String actual = NumberFormatter.withLocale(ULocale.ENGLISH).precision(Precision.unlimited()) in unlimitedRoundingBigDecimal()
/third_party/icu/icu4c/source/test/intltest/
Dnumbertest_api.cpp144 NumberFormatter::with(), in notationSimple()
160 NumberFormatter::with().notation(Notation::simple()), in notationSimple()
176 NumberFormatter::with(), in notationSimple()
188 NumberFormatter::with().notation(Notation::scientific()), in notationScientific()
204 NumberFormatter::with().notation(Notation::engineering()), in notationScientific()
220 NumberFormatter::with().notation( in notationScientific()
237 NumberFormatter::with().notation(Notation::scientific().withMinExponentDigits(2)), in notationScientific()
253 NumberFormatter::with().notation(Notation::scientific()), in notationScientific()
262 NumberFormatter::with().notation(Notation::scientific()), in notationScientific()
271 NumberFormatter::with().notation(Notation::scientific()), in notationScientific()
[all …]
Dnumbertest_range.cpp92 .numberFormatterBoth(NumberFormatter::with().unit(METER)), in testBasic()
108 .numberFormatterFirst(NumberFormatter::with().unit(METER)) in testBasic()
109 .numberFormatterSecond(NumberFormatter::with().unit(KILOMETER)), in testBasic()
125 … .numberFormatterBoth(NumberFormatter::with().unit(METER).unitWidth(UNUM_UNIT_WIDTH_FULL_NAME)), in testBasic()
141 ….numberFormatterBoth(NumberFormatter::with().unit(FAHRENHEIT).unitWidth(UNUM_UNIT_WIDTH_FULL_NAME)… in testBasic()
173 .numberFormatterBoth(NumberFormatter::with().unit(KELVIN)), in testBasic()
205 .numberFormatterBoth(NumberFormatter::with().unit(PTE)), in testBasic()
223 .numberFormatterBoth(NumberFormatter::with().unit(USD)), in testCollapse()
239 .numberFormatterBoth(NumberFormatter::with().unit(USD).precision(Precision::integer())), in testCollapse()
256 .numberFormatterBoth(NumberFormatter::with().unit(USD).precision(Precision::integer())), in testCollapse()
[all …]
Dnumbertest_skeletons.cpp151 NumberFormatter::forSkeleton(skeletonString, perror, status); in validTokens()
279 NumberFormatter::forSkeleton(skeletonString, perror, status); in stemsRequiringOption()
314 UnicodeString normalized = NumberFormatter::forSkeleton( in defaultTokens()
337 UnicodeString actual = NumberFormatter::forSkeleton(skeletonString, status).locale("en") in flexibleSeparators()
365 UnicodeString normalized = NumberFormatter::forSkeleton(plus, status) in wildcardCharacters()
377 NumberFormatter::forSkeleton(skeletonString, status); in expectedErrorSkeleton()
447 UnicodeString actual = NumberFormatter::forSkeleton(skeleton, status).locale("ar") in perUnitInArabic()
484 UnicodeString toSkeleton = NumberFormatter::forSkeleton( in perUnitToSkeleton()
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/number/
DFractionPrecision.java39 NumberFormatter.RoundingPriority priority) { in withSignificantDigits()
77 this, 1, minSignificantDigits, NumberFormatter.RoundingPriority.RELAXED, true); in withMinDigits()
110 this, 1, maxSignificantDigits, NumberFormatter.RoundingPriority.STRICT, true); in withMaxDigits()
DNumberFormatterSettings.java9 import com.ibm.icu.number.NumberFormatter.DecimalSeparatorDisplay;
10 import com.ibm.icu.number.NumberFormatter.GroupingStrategy;
11 import com.ibm.icu.number.NumberFormatter.SignDisplay;
12 import com.ibm.icu.number.NumberFormatter.UnitWidth;
DNumberFormatter.java67 public final class NumberFormatter { class
519 private NumberFormatter() { in NumberFormatter() method in NumberFormatter
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/number/
DMixedUnitLongNameHandler.java12 import com.ibm.icu.number.NumberFormatter;
61 NumberFormatter.UnitWidth width, in forMeasureUnit()
88 if (width == NumberFormatter.UnitWidth.NARROW) { in forMeasureUnit()
90 } else if (width == NumberFormatter.UnitWidth.FULL_NAME) { in forMeasureUnit()
100 result.fIntegerFormatter = NumberFormatter.withLocale(locale); in forMeasureUnit()
DMacroProps.java10 import com.ibm.icu.number.NumberFormatter.DecimalSeparatorDisplay;
11 import com.ibm.icu.number.NumberFormatter.SignDisplay;
12 import com.ibm.icu.number.NumberFormatter.UnitWidth;
DMicroProps.java8 import com.ibm.icu.number.NumberFormatter.DecimalSeparatorDisplay;
9 import com.ibm.icu.number.NumberFormatter.SignDisplay;
DLongNameMultiplexer.java8 import com.ibm.icu.number.NumberFormatter;
47 NumberFormatter.UnitWidth width, in forMeasureUnits()
/third_party/icu/docs/userguide/format_parse/numbers/
Dindex.md16 [`NumberFormatter`](https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/numberformatter_8h…
17 …ub.io/icu-docs/apidoc/released/icu4j/com/ibm/icu/number/NumberFormatter.html)). `NumberFormatter`…
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/number/
DNumberFormatterSettings.java10 import ohos.global.icu.number.NumberFormatter.DecimalSeparatorDisplay;
11 import ohos.global.icu.number.NumberFormatter.GroupingStrategy;
12 import ohos.global.icu.number.NumberFormatter.SignDisplay;
13 import ohos.global.icu.number.NumberFormatter.UnitWidth;
DNumberFormatter.java67 public final class NumberFormatter { class
397 private NumberFormatter() { in NumberFormatter() method in NumberFormatter
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/message2/
DNumberFormatterFactory.java13 import com.ibm.icu.number.NumberFormatter;
44 nf = NumberFormatter.forSkeleton(skeleton); in formatterForOptions()
46 nf = NumberFormatter.with(); in formatterForOptions()
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/impl/number/
DMacroProps.java11 import ohos.global.icu.number.NumberFormatter.DecimalSeparatorDisplay;
12 import ohos.global.icu.number.NumberFormatter.SignDisplay;
13 import ohos.global.icu.number.NumberFormatter.UnitWidth;
DMicroProps.java7 import ohos.global.icu.number.NumberFormatter.DecimalSeparatorDisplay;
8 import ohos.global.icu.number.NumberFormatter.SignDisplay;
/third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/
DPluralRangesTest.java22 import com.ibm.icu.number.NumberFormatter;
23 import com.ibm.icu.number.NumberFormatter.UnitWidth;
111 .numberFormatterBoth(NumberFormatter.with().unit(unit).unitWidth(unitWidth)) in TestFormatting()

12345