Home
last modified time | relevance | path

Searched refs:DecimalFormat (Results 1 – 25 of 210) sorted by relevance

123456789

/external/icu/icu4j/eclipse-build/plugins.template/com.ibm.icu.base.tests/src/com/ibm/icu/tests/
DDecimalFormatTest.java14 import com.ibm.icu.text.DecimalFormat;
25 DecimalFormat df = new DecimalFormat("#,#0.00"); in testClone()
26 DecimalFormat df2 = new DecimalFormat("#,#0.00"); in testClone()
27 DecimalFormat dfn = new DecimalFormat("#,#0.00"); in testClone()
43 DecimalFormat df = new DecimalFormat(); in testDecimalFormat()
51 DecimalFormat df = new DecimalFormat("#,##0.000"); in testDecimalFormatString()
60 DecimalFormat df = new DecimalFormat("#,##0.000", sym); in testDecimalFormatStringDecimalFormatSymbols()
69 DecimalFormat df = new DecimalFormat("#,##0.000", sym); in testGetDecimalFormatSymbols()
77 DecimalFormat df = new DecimalFormat(); in testSetDecimalFormatSymbols()
86 DecimalFormat df = new DecimalFormat("+#,##0.#;-#,##0.#"); in testGetPositivePrefix()
[all …]
/external/icu/icu4c/source/i18n/
Ddecimfmt.cpp31 using ERoundingMode = icu::DecimalFormat::ERoundingMode;
32 using EPadPosition = icu::DecimalFormat::EPadPosition;
43 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(DecimalFormat) in UOBJECT_DEFINE_RTTI_IMPLEMENTATION() argument
46 DecimalFormat::DecimalFormat(UErrorCode& status) in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
47 : DecimalFormat(nullptr, status) { in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
60 DecimalFormat::DecimalFormat(const UnicodeString& pattern, UErrorCode& status) in DecimalFormat() function in DecimalFormat
61 : DecimalFormat(nullptr, status) { in DecimalFormat()
66 DecimalFormat::DecimalFormat(const UnicodeString& pattern, DecimalFormatSymbols* symbolsToAdopt, in DecimalFormat() function in DecimalFormat
68 : DecimalFormat(symbolsToAdopt, status) { in DecimalFormat()
73 DecimalFormat::DecimalFormat(const UnicodeString& pattern, DecimalFormatSymbols* symbolsToAdopt, in DecimalFormat() function in DecimalFormat
[all …]
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/
DBigNumberFormatTest.java21 import android.icu.text.DecimalFormat;
39 DecimalFormat fmt1 = new DecimalFormat("0.###E0", US); in TestExponent()
40 DecimalFormat fmt2 = new DecimalFormat("0.###E+0", US); in TestExponent()
55 DecimalFormat f = new DecimalFormat("#,##,###", US); in TestSecondaryGrouping()
65 f = (DecimalFormat) NumberFormat.getInstance(new Locale("hi", "IN")); in TestSecondaryGrouping()
71 private void expectPad(DecimalFormat fmt, String pat, int pos) { in expectPad()
75 private void expectPad(DecimalFormat fmt, String pat, in expectPad()
104 DecimalFormat fmt = new DecimalFormat("#", US); in TestPatterns()
106 expectPad(fmt, "*^#", DecimalFormat.PAD_BEFORE_PREFIX, 1, '^'); in TestPatterns()
107 expectPad(fmt, "$*^#", DecimalFormat.PAD_AFTER_PREFIX, 2, '^'); in TestPatterns()
[all …]
DNumberFormatTest.java55 import android.icu.text.DecimalFormat;
77 DecimalFormat format = in TestRoundingScientific10542()
78 new DecimalFormat("0.00E0"); in TestRoundingScientific10542()
176 …private void verifyRounding(DecimalFormat format, double[] values, String[][] expected, int[] roun… in verifyRounding()
207 DecimalFormat parser = (DecimalFormat) NumberFormat.getInstance(new ULocale("fa")); in TestParseNegativeWithFaLocale()
218 DecimalFormat parser = (DecimalFormat) NumberFormat.getInstance(new ULocale("en")); in TestParseNegativeWithAlternativeMinusSign()
238 DecimalFormat fmt = new DecimalFormat(pat[i], sym); in TestPatterns()
309 DecimalFormat fmt = new DecimalFormat(pat[p], sym); in TestExponential()
361 DecimalFormat fmt = new DecimalFormat(pat.toString(), sym); in TestQuotes()
370 fmt = new DecimalFormat(pat.toString(), sym); in TestQuotes()
[all …]
DNumberRegressionTests.java51 import android.icu.text.DecimalFormat;
104 DecimalFormat df = new DecimalFormat(); in Test4088161()
128 DecimalFormat df = new DecimalFormat("#,##0.0", symbols); in Test4087245()
146 DecimalFormat df = new DecimalFormat(); in Test4087535()
165 DecimalFormat df = new DecimalFormat(); in Test4088503()
205 DecimalFormat format = new DecimalFormat("00"); in Test4059870()
248 logln("nf toPattern1: " + ((DecimalFormat)nf).toPattern()); in Test4086575()
249 logln("nf toLocPattern1: " + ((DecimalFormat)nf).toLocalizedPattern()); in Test4086575()
253 ((DecimalFormat)nf).applyLocalizedPattern("###,00;(###,00)"); in Test4086575()
254 logln("nf toPattern2: " + ((DecimalFormat)nf).toPattern()); in Test4086575()
[all …]
DIntlTestDecimalFormatAPI.java35 import android.icu.text.DecimalFormat;
67 DecimalFormat dec = new DecimalFormat(pat); in testJB1871()
77 dec = new DecimalFormat(pat); in testJB1871()
87 dec = new DecimalFormat(pat); in testJB1871()
114 DecimalFormat def = new DecimalFormat(); in TestAPI()
117 DecimalFormat pat = null; in TestAPI()
119 pat = new DecimalFormat(pattern); in TestAPI()
127 DecimalFormat cust1 = new DecimalFormat(pattern, symbols); in TestAPI()
276 DecimalFormat decfmt = new DecimalFormat(); in testJB6134()
296 DecimalFormat decfmt = new DecimalFormat(); in testJB4971()
[all …]
DScientificNumberFormatterTest.java17 import android.icu.text.DecimalFormat;
59 DecimalFormat decfmt = (DecimalFormat) NumberFormat.getScientificInstance(ULocale.ENGLISH); in TestPlusSignInExponentMarkup()
73 DecimalFormat decfmt = (DecimalFormat) NumberFormat.getScientificInstance(ULocale.ENGLISH); in TestPlusSignInExponentSuperscript()
85 DecimalFormat decfmt = (DecimalFormat) NumberFormat.getInstance(ULocale.ENGLISH); in TestFixedDecimalMarkup()
96 DecimalFormat decfmt = (DecimalFormat) NumberFormat.getInstance(ULocale.ENGLISH); in TestFixedDecimalSuperscript()
DNumberFormatSpecificationTest.java17 import android.icu.text.DecimalFormat;
138 DecimalFormat fmt = new DecimalFormat("¤¤ **#######0", sym); in TestPadding()
146 DecimalFormat fmt = new DecimalFormat("¤¤ **#######0;¤¤ (#)", sym); in TestPadding()
153 DecimalFormat fmt = new DecimalFormat("QU**00.#####E0", sym); in TestPadding()
162 DecimalFormat fmt = new DecimalFormat(pattern, sym); in formatFrWithPattern()
168 return new DecimalFormat(pattern, sym); in nfWithPattern()
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/
DBigNumberFormatTest.java20 import com.ibm.icu.text.DecimalFormat;
36 DecimalFormat fmt1 = new DecimalFormat("0.###E0", US); in TestExponent()
37 DecimalFormat fmt2 = new DecimalFormat("0.###E+0", US); in TestExponent()
52 DecimalFormat f = new DecimalFormat("#,##,###", US); in TestSecondaryGrouping()
62 f = (DecimalFormat) NumberFormat.getInstance(new Locale("hi", "IN")); in TestSecondaryGrouping()
68 private void expectPad(DecimalFormat fmt, String pat, int pos) { in expectPad()
72 private void expectPad(DecimalFormat fmt, String pat, in expectPad()
101 DecimalFormat fmt = new DecimalFormat("#", US); in TestPatterns()
103 expectPad(fmt, "*^#", DecimalFormat.PAD_BEFORE_PREFIX, 1, '^'); in TestPatterns()
104 expectPad(fmt, "$*^#", DecimalFormat.PAD_AFTER_PREFIX, 2, '^'); in TestPatterns()
[all …]
DNumberFormatTest.java54 import com.ibm.icu.text.DecimalFormat;
74 DecimalFormat format = in TestRoundingScientific10542()
75 new DecimalFormat("0.00E0"); in TestRoundingScientific10542()
173 …private void verifyRounding(DecimalFormat format, double[] values, String[][] expected, int[] roun… in verifyRounding()
204 DecimalFormat parser = (DecimalFormat) NumberFormat.getInstance(new ULocale("fa")); in TestParseNegativeWithFaLocale()
215 DecimalFormat parser = (DecimalFormat) NumberFormat.getInstance(new ULocale("en")); in TestParseNegativeWithAlternativeMinusSign()
235 DecimalFormat fmt = new DecimalFormat(pat[i], sym); in TestPatterns()
306 DecimalFormat fmt = new DecimalFormat(pat[p], sym); in TestExponential()
358 DecimalFormat fmt = new DecimalFormat(pat.toString(), sym); in TestQuotes()
367 fmt = new DecimalFormat(pat.toString(), sym); in TestQuotes()
[all …]
DNumberRegressionTests.java50 import com.ibm.icu.text.DecimalFormat;
101 DecimalFormat df = new DecimalFormat(); in Test4088161()
125 DecimalFormat df = new DecimalFormat("#,##0.0", symbols); in Test4087245()
143 DecimalFormat df = new DecimalFormat(); in Test4087535()
162 DecimalFormat df = new DecimalFormat(); in Test4088503()
202 DecimalFormat format = new DecimalFormat("00"); in Test4059870()
245 logln("nf toPattern1: " + ((DecimalFormat)nf).toPattern()); in Test4086575()
246 logln("nf toLocPattern1: " + ((DecimalFormat)nf).toLocalizedPattern()); in Test4086575()
250 ((DecimalFormat)nf).applyLocalizedPattern("###,00;(###,00)"); in Test4086575()
251 logln("nf toPattern2: " + ((DecimalFormat)nf).toPattern()); in Test4086575()
[all …]
DIntlTestDecimalFormatAPI.java34 import com.ibm.icu.text.DecimalFormat;
64 DecimalFormat dec = new DecimalFormat(pat); in testJB1871()
74 dec = new DecimalFormat(pat); in testJB1871()
84 dec = new DecimalFormat(pat); in testJB1871()
111 DecimalFormat def = new DecimalFormat(); in TestAPI()
114 DecimalFormat pat = null; in TestAPI()
116 pat = new DecimalFormat(pattern); in TestAPI()
124 DecimalFormat cust1 = new DecimalFormat(pattern, symbols); in TestAPI()
273 DecimalFormat decfmt = new DecimalFormat(); in testJB6134()
293 DecimalFormat decfmt = new DecimalFormat(); in testJB4971()
[all …]
DScientificNumberFormatterTest.java16 import com.ibm.icu.text.DecimalFormat;
56 DecimalFormat decfmt = (DecimalFormat) NumberFormat.getScientificInstance(ULocale.ENGLISH); in TestPlusSignInExponentMarkup()
70 DecimalFormat decfmt = (DecimalFormat) NumberFormat.getScientificInstance(ULocale.ENGLISH); in TestPlusSignInExponentSuperscript()
82 DecimalFormat decfmt = (DecimalFormat) NumberFormat.getInstance(ULocale.ENGLISH); in TestFixedDecimalMarkup()
93 DecimalFormat decfmt = (DecimalFormat) NumberFormat.getInstance(ULocale.ENGLISH); in TestFixedDecimalSuperscript()
DNumberFormatSpecificationTest.java16 import com.ibm.icu.text.DecimalFormat;
135 DecimalFormat fmt = new DecimalFormat("¤¤ **#######0", sym); in TestPadding()
143 DecimalFormat fmt = new DecimalFormat("¤¤ **#######0;¤¤ (#)", sym); in TestPadding()
150 DecimalFormat fmt = new DecimalFormat("QU**00.#####E0", sym); in TestPadding()
159 DecimalFormat fmt = new DecimalFormat(pattern, sym); in formatFrWithPattern()
165 return new DecimalFormat(pattern, sym); in nfWithPattern()
/external/icu/icu4j/eclipse-build/plugins.template/com.ibm.icu.base/src/com/ibm/icu/text/
DDecimalFormat.java592 public class DecimalFormat extends NumberFormat { class
599 public DecimalFormat(java.text.DecimalFormat delegate) { in DecimalFormat() method in DecimalFormat
618 public DecimalFormat() { in DecimalFormat() method in DecimalFormat
621 this(new java.text.DecimalFormat()); in DecimalFormat()
627 if (jdkNfmt instanceof java.text.DecimalFormat) { in DecimalFormat()
628 …((java.text.DecimalFormat)numberFormat).applyPattern(((java.text.DecimalFormat)jdkNfmt).toPattern(… in DecimalFormat()
629 …((java.text.DecimalFormat)numberFormat).setDecimalFormatSymbols(((java.text.DecimalFormat)jdkNfmt)… in DecimalFormat()
651 public DecimalFormat(String pattern) { in DecimalFormat() method in DecimalFormat
652 this(new java.text.DecimalFormat( in DecimalFormat()
676 public DecimalFormat(String pattern, DecimalFormatSymbols symbols) { in DecimalFormat() method in DecimalFormat
[all …]
/external/icu/icu4c/source/test/intltest/
Dnumfmtst.cpp337 DecimalFormat df1("#", new DecimalFormatSymbols(dfs), errorCode); in TestLocalizedPatternSymbolCoverage()
339 DecimalFormat df2("#", new DecimalFormatSymbols(dfs), errorCode); in TestLocalizedPatternSymbolCoverage()
354 DecimalFormat df1("#", new DecimalFormatSymbols(dfs), errorCode); in TestLocalizedPatternSymbolCoverage()
356 DecimalFormat df2("#", new DecimalFormatSymbols(dfs), errorCode); in TestLocalizedPatternSymbolCoverage()
383 DecimalFormat fmt(pat[i], sym, status); in TestPatterns()
518 DecimalFormat fmt(pat[p], sym, status); in TestExponential()
610 DecimalFormat* fmt = (DecimalFormat*)NumberFormat::createCurrencyInstance("en_US", status); in TestScientific2()
626 DecimalFormat fmt("##0.00E0",status); in TestScientificGrouping()
661 DecimalFormat fmt("#.#E0",status); in TestInt64()
757 DecimalFormat *fmt = new DecimalFormat(*pat, *sym, status); in TestQuotes()
[all …]
Dscientificnumberformattertest.cpp120 …LocalPointer<DecimalFormat> decfmt((DecimalFormat *) NumberFormat::createScientificInstance("en", … in TestPlusSignInExponentMarkup()
132 new DecimalFormat(*decfmt), "<sup>", "</sup>", status)); in TestPlusSignInExponentMarkup()
147 …LocalPointer<DecimalFormat> decfmt((DecimalFormat *) NumberFormat::createScientificInstance("en", … in TestPlusSignInExponentSuperscript()
159 new DecimalFormat(*decfmt), status)); in TestPlusSignInExponentSuperscript()
174 … LocalPointer<DecimalFormat> decfmt((DecimalFormat *) NumberFormat::createInstance("en", status)); in TestFixedDecimalMarkup()
180 new DecimalFormat(*decfmt), "<sup>", "</sup>", status)); in TestFixedDecimalMarkup()
196 … LocalPointer<DecimalFormat> decfmt((DecimalFormat *) NumberFormat::createInstance("en", status)); in TestFixedDecimalSuperscript()
202 new DecimalFormat(*decfmt), status)); in TestFixedDecimalSuperscript()
Dnumberformattesttuple.cpp32 {"ceiling", DecimalFormat::kRoundCeiling},
33 {"floor", DecimalFormat::kRoundFloor},
34 {"down", DecimalFormat::kRoundDown},
35 {"up", DecimalFormat::kRoundUp},
36 {"halfEven", DecimalFormat::kRoundHalfEven},
37 {"halfDown", DecimalFormat::kRoundHalfDown},
38 {"halfUp", DecimalFormat::kRoundHalfUp},
39 {"unnecessary", DecimalFormat::kRoundUnnecessary}};
46 {"beforePrefix", DecimalFormat::kPadBeforePrefix},
47 {"afterPrefix", DecimalFormat::kPadAfterPrefix},
[all …]
Dnumrgts.cpp293 DecimalFormat *df = new DecimalFormat(status); in Test4088161()
329 DecimalFormat *df = new DecimalFormat("#,##0.0", *symbols, status); in Test4087245()
353 DecimalFormat *df = new DecimalFormat(status); in Test4087535()
381 DecimalFormat *df = new DecimalFormat(status); in Test4088503()
445 DecimalFormat *format = new DecimalFormat("00", status); in Test4059870()
525 DecimalFormat *nf = dynamic_cast<DecimalFormat *>(nf1); in Test4086575()
595 DecimalFormat *df = new DecimalFormat(status); in Test4068693()
651 DecimalFormat *df = new DecimalFormat(status); in Test4087251()
717 DecimalFormat *df = new DecimalFormat(status); in Test4090504()
746 DecimalFormat *df = new DecimalFormat(status); in Test4095713()
[all …]
Ddcfmapts.cpp114 DecimalFormat def(status); in testAPI()
122 DecimalFormat noGrouping("###0.##", status); in testAPI()
131 DecimalFormat df("0", {"en", status}, status); in testAPI()
143 DecimalFormat df("#,##0", {"en", status}, status); in testAPI()
158 DecimalFormat pat(pattern, status); in testAPI()
172 DecimalFormat cust1(pattern, symbols, status); in testAPI()
178 DecimalFormat cust2(pattern, *symbols, status); in testAPI()
183 DecimalFormat copy(pat); in testAPI()
377 pat = DecimalFormat(status); // reset in testAPI()
435 NumberFormat *test = new DecimalFormat(status); in testAPI()
[all …]
/external/icu/icu4j/perf-tests/src/com/ibm/icu/dev/test/perf/
DDecimalFormatPerformanceTest.java24 com.ibm.icu.text.DecimalFormat[] icuDecimalFormat;
26 java.text.DecimalFormat[] javaDecimalFormat;
43 icuDecimalFormat = new com.ibm.icu.text.DecimalFormat[threads]; in setup()
44 javaDecimalFormat = new java.text.DecimalFormat[threads]; in setup()
46 icuDecimalFormat[i] = new com.ibm.icu.text.DecimalFormat(pattern, in setup()
48 javaDecimalFormat[i] = new java.text.DecimalFormat(pattern, in setup()
66 new com.ibm.icu.text.DecimalFormat(pattern, in TestICUConstruction()
75 new java.text.DecimalFormat(pattern, new java.text.DecimalFormatSymbols(locale));
/external/icu/icu4j/main/tests/framework/src/com/ibm/icu/dev/util/
DTimer.java11 import com.ibm.icu.text.DecimalFormat;
59 public DecimalFormat getNumberFormat() { in getNumberFormat()
63 public DecimalFormat getPercentFormat() { in getPercentFormat()
81 private DecimalFormat nf = (DecimalFormat) NumberFormat.getNumberInstance(ULocale.ENGLISH);
82 private DecimalFormat pf = (DecimalFormat) NumberFormat.getPercentInstance(ULocale.ENGLISH);
/external/icu/android_icu4j/src/main/tests/android/icu/dev/util/
DTimer.java12 import android.icu.text.DecimalFormat;
62 public DecimalFormat getNumberFormat() { in getNumberFormat()
66 public DecimalFormat getPercentFormat() { in getPercentFormat()
84 private DecimalFormat nf = (DecimalFormat) NumberFormat.getNumberInstance(ULocale.ENGLISH);
85 private DecimalFormat pf = (DecimalFormat) NumberFormat.getPercentInstance(ULocale.ENGLISH);
/external/icu/icu4c/source/i18n/unicode/
Ddecimfmt.h677 class U_I18N_API DecimalFormat : public NumberFormat {
703 DecimalFormat(UErrorCode& status);
722 DecimalFormat(const UnicodeString& pattern, UErrorCode& status);
745DecimalFormat(const UnicodeString& pattern, DecimalFormatSymbols* symbolsToAdopt, UErrorCode& stat…
761 DecimalFormat(const UnicodeString& pattern, DecimalFormatSymbols* symbolsToAdopt,
781 DecimalFormat(const DecimalFormatSymbols* symbolsToAdopt, UErrorCode& status);
795 …virtual DecimalFormat& setAttribute(UNumberFormatAttribute attr, int32_t newValue, UErrorCode& sta…
857 DecimalFormat(const UnicodeString& pattern, DecimalFormatSymbols* symbolsToAdopt,
880DecimalFormat(const UnicodeString& pattern, const DecimalFormatSymbols& symbols, UErrorCode& statu…
888 DecimalFormat(const DecimalFormat& source);
[all …]
/external/icu/android_icu4j/src/main/java/android/icu/impl/number/
DPadder.java20 case android.icu.text.DecimalFormat.PAD_BEFORE_PREFIX: in fromOld()
22 case android.icu.text.DecimalFormat.PAD_AFTER_PREFIX: in fromOld()
24 case android.icu.text.DecimalFormat.PAD_BEFORE_SUFFIX: in fromOld()
26 case android.icu.text.DecimalFormat.PAD_AFTER_SUFFIX: in fromOld()
36 return android.icu.text.DecimalFormat.PAD_BEFORE_PREFIX; in toOld()
38 return android.icu.text.DecimalFormat.PAD_AFTER_PREFIX; in toOld()
40 return android.icu.text.DecimalFormat.PAD_BEFORE_SUFFIX; in toOld()
42 return android.icu.text.DecimalFormat.PAD_AFTER_SUFFIX; in toOld()

123456789