Home
last modified time | relevance | path

Searched refs:NumberFormat (Results 1 – 25 of 183) sorted by relevance

12345678

/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/
DNumberFormatRegistrationTest.java11 import com.ibm.icu.text.NumberFormat;
12 import com.ibm.icu.text.NumberFormat.SimpleNumberFormatFactory;
26 NumberFormat currencyStyle; in TestRegistration()
34 currencyStyle = NumberFormat.getIntegerInstance(swapLoc); in TestRegistration()
37 public NumberFormat createFormat(ULocale loc, int formatType) { in TestRegistration()
49 NumberFormat.unregister(null); in TestRegistration()
57 NumberFormat.registerFactory(null); in TestRegistration()
69 if (NumberFormat.unregister("")) { in TestRegistration()
78 NumberFormat f0 = NumberFormat.getIntegerInstance(SWAP_LOC); in TestRegistration()
79 NumberFormat f1 = NumberFormat.getIntegerInstance(SRC_LOC); in TestRegistration()
[all …]
DIntlTestDecimalFormatAPIC.java26 import com.ibm.icu.text.NumberFormat;
287 t_Format(1, number, NumberFormat.getNumberInstance(us), in testFormatToCharacterIterator()
291 t_Format(3, number, NumberFormat.getPercentInstance(us), in testFormatToCharacterIterator()
307 t_Format(7, number, NumberFormat.getCurrencyInstance(us), in testFormatToCharacterIterator()
311 t_Format(8, negativeNumber, NumberFormat.getCurrencyInstance(us), in testFormatToCharacterIterator()
316 t_Format(11, number, NumberFormat.getNumberInstance(us), in testFormatToCharacterIterator()
321 t_Format(12, number, NumberFormat.getNumberInstance(us), in testFormatToCharacterIterator()
327 v.add(new FieldContainer(0, 3, NumberFormat.Field.INTEGER)); in getNumberVectorUS()
328 v.add(new FieldContainer(3, 4, NumberFormat.Field.DECIMAL_SEPARATOR)); in getNumberVectorUS()
329 v.add(new FieldContainer(4, 6, NumberFormat.Field.FRACTION)); in getNumberVectorUS()
[all …]
DIntlTestNumberFormatAPI.java24 import com.ibm.icu.text.NumberFormat;
43 NumberFormat def = NumberFormat.getInstance(); in TestAPI()
45 NumberFormat fr = NumberFormat.getInstance(Locale.FRENCH); in TestAPI()
47 NumberFormat cur = NumberFormat.getCurrencyInstance(); in TestAPI()
49 NumberFormat cur_fr = NumberFormat.getCurrencyInstance(Locale.FRENCH); in TestAPI()
51 NumberFormat per = NumberFormat.getPercentInstance(); in TestAPI()
53 NumberFormat per_fr = NumberFormat.getPercentInstance(Locale.FRENCH); in TestAPI()
55 NumberFormat integer = NumberFormat.getIntegerInstance(); in TestAPI()
57 NumberFormat int_fr = NumberFormat.getIntegerInstance(Locale.FRENCH); in TestAPI()
149 final Locale[] locales = NumberFormat.getAvailableLocales(); in TestAPI()
[all …]
DNumberFormatRegressionTest.java26 import com.ibm.icu.text.NumberFormat;
43 NumberFormat nf = NumberFormat.getInstance(Locale.US); in Test4161100()
71 NumberFormat nf = NumberFormat.getInstance(loc); in TestJ691()
103 NumberFormat nf1 = NumberFormat.getIntegerInstance(); in Test4408066()
104 NumberFormat nf2 = NumberFormat.getIntegerInstance(Locale.CHINA); in Test4408066()
178 NumberFormat format = (NumberFormat) ois.readObject(); in TestSerialization()
274 NumberFormat nfmt = NumberFormat.getInstance(); in TestT5698()
302 NumberFormat nfmt = NumberFormat.getInstance(); in TestSurrogatesParsing()
317 void checkNBSPPatternRtNum(String testcase, NumberFormat nf, double myNumber) { in checkNBSPPatternRtNum()
335 void checkNBSPPatternRT(String testcase, NumberFormat nf) { in checkNBSPPatternRT()
[all …]
DNumberFormatTest.java36 import com.ibm.icu.text.NumberFormat;
37 import com.ibm.icu.text.NumberFormat.NumberFormatFactory;
38 import com.ibm.icu.text.NumberFormat.SimpleNumberFormatFactory;
169 NumberFormat nff = NumberFormat.getNumberInstance(ULocale.ENGLISH); in Test10419RoundingWith0FractionDigits()
178 DecimalFormat parser = (DecimalFormat) NumberFormat.getInstance(new ULocale("fa")); in TestParseNegativeWithFaLocale()
188 DecimalFormat parser = (DecimalFormat) NumberFormat.getInstance(new ULocale("en")); in TestParseNegativeWithAlternativeMinusSign()
213 String s = ((NumberFormat)fmt).format(0); in TestPatterns()
221 s = ((NumberFormat)fmt).format(BigInteger.ZERO); in TestPatterns()
282 s = ((NumberFormat) fmt).format(val[v]); in TestExponential()
297 s = ((NumberFormat) fmt).format(lval[v]); in TestExponential()
[all …]
DNumberFormatRoundTripTest.java19 import com.ibm.icu.text.NumberFormat;
41 NumberFormat fmt = null; in TestNumberFormatRoundTrip()
46 fmt = NumberFormat.getInstance(); in TestNumberFormatRoundTrip()
50 fmt = NumberFormat.getCurrencyInstance(); in TestNumberFormatRoundTrip()
54 fmt = NumberFormat.getPercentInstance(); in TestNumberFormatRoundTrip()
59 final Locale[] loc = NumberFormat.getAvailableLocales(); in TestNumberFormatRoundTrip()
68 fmt = NumberFormat.getInstance(loc[i]); in TestNumberFormatRoundTrip()
71 fmt = NumberFormat.getCurrencyInstance(loc[i]); in TestNumberFormatRoundTrip()
74 fmt = NumberFormat.getPercentInstance(loc[i]); in TestNumberFormatRoundTrip()
92 public void _test(NumberFormat fmt) { in _test()
[all …]
DWriteNumberFormatSerialTestData.java15 import com.ibm.icu.text.NumberFormat;
39 NumberFormat nf = NumberFormat.getInstance(Locale.US); in main()
40 NumberFormat nfc = NumberFormat.getCurrencyInstance(Locale.US); in main()
41 NumberFormat nfp = NumberFormat.getPercentInstance(Locale.US); in main()
42 NumberFormat nfsp = NumberFormat.getScientificInstance(Locale.US); in main()
DNumberRegression.java44 import com.ibm.icu.text.NumberFormat;
177 NumberFormat nfcommon = NumberFormat.getCurrencyInstance(Locale.US); in assignFloatValue()
214 NumberFormat nf = NumberFormat.getInstance(); in Test4071492()
229 NumberFormat nf = NumberFormat.getInstance(Locale.FRANCE); in Test4086575()
443 DecimalFormat df = (DecimalFormat) NumberFormat.getCurrencyInstance(de); in Test4087244()
472 NumberFormat formatter; in Test4070798()
483 formatter = NumberFormat.getNumberInstance(Locale.FRANCE); in Test4070798()
495 formatter = NumberFormat.getCurrencyInstance(Locale.FRANCE); in Test4070798()
507 formatter = NumberFormat.getPercentInstance(Locale.FRANCE); in Test4070798()
523 NumberFormat formatter; in Test4071005()
[all …]
/external/icu/icu4c/source/i18n/
Dnumfmt.cpp105 const int32_t icu::NumberFormat::gDefaultMaxIntegerDigits = 2000000000;
106 const int32_t icu::NumberFormat::gDefaultMinIntegerDigits = 127;
194 UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION(NumberFormat) in UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION() argument
226 NumberFormat::NumberFormat() in NumberFormat() function in NumberFormat
241 NumberFormat::~NumberFormat() in ~NumberFormat()
252 NumberFormat::NumberFormat(const NumberFormat &source) in NumberFormat() function in NumberFormat
261 NumberFormat&
262 NumberFormat::operator=(const NumberFormat& rhs) in operator =()
283 NumberFormat::operator==(const Format& that) const in operator ==()
286 NumberFormat* other = (NumberFormat*)&that; in operator ==()
[all …]
Dunum.cpp48 NumberFormat *retVal = NULL; in unum_open()
59 retVal = NumberFormat::createInstance(Locale(locale), style, *status); in unum_open()
132 delete (NumberFormat*) fmt; in unum_close()
143 const NumberFormat* nf = reinterpret_cast<const NumberFormat*>(fmt); in unum_clone()
195 ((const NumberFormat*)fmt)->format(number, res, fp, *status); in unum_formatInt64()
228 ((const NumberFormat*)fmt)->format(number, res, fp, *status); in unum_formatDouble()
272 ((const NumberFormat*)fmt)->format(numFmtbl, resultStr, fp, *status); in unum_formatDecimal()
311 ((const NumberFormat*)fmt)->format(n, res, fp, *status); in unum_formatDoubleCurrency()
338 ((const NumberFormat*)fmt)->parse(src, res, pp); in parseRes()
437 LocalPointer<CurrencyAmount> currAmt(((const NumberFormat*)fmt)->parseCurrency(src, pp)); in unum_parseDoubleCurrency()
[all …]
Dsharednumberformat.h17 class NumberFormat; variable
21 SharedNumberFormat(NumberFormat *nfToAdopt) : ptr(nfToAdopt) { } in SharedNumberFormat()
23 const NumberFormat *get() const { return ptr; } in get()
24 const NumberFormat *operator->() const { return ptr; }
25 const NumberFormat &operator*() const { return *ptr; }
27 NumberFormat *ptr;
/external/apache-commons-math/src/main/java/org/apache/commons/math/fraction/
DAbstractFormat.java22 import java.text.NumberFormat;
34 public abstract class AbstractFormat extends NumberFormat implements Serializable {
40 protected NumberFormat denominatorFormat;
43 protected NumberFormat numeratorFormat;
58 protected AbstractFormat(final NumberFormat format) { in AbstractFormat()
59 this(format, (NumberFormat) format.clone()); in AbstractFormat()
68 protected AbstractFormat(final NumberFormat numeratorFormat, in AbstractFormat()
69 final NumberFormat denominatorFormat) { in AbstractFormat()
80 protected static NumberFormat getDefaultNumberFormat() { in getDefaultNumberFormat()
91 protected static NumberFormat getDefaultNumberFormat(final Locale locale) { in getDefaultNumberFormat()
[all …]
DProperFractionFormat.java20 import java.text.NumberFormat;
44 private NumberFormat wholeFormat;
60 public ProperFractionFormat(NumberFormat format) { in ProperFractionFormat()
61 this(format, (NumberFormat)format.clone(), (NumberFormat)format.clone()); in ProperFractionFormat()
71 public ProperFractionFormat(NumberFormat wholeFormat, in ProperFractionFormat()
72 NumberFormat numeratorFormat, in ProperFractionFormat()
73 NumberFormat denominatorFormat) in ProperFractionFormat()
118 public NumberFormat getWholeFormat() { in getWholeFormat()
226 public void setWholeFormat(NumberFormat format) { in setWholeFormat()
DProperBigFractionFormat.java21 import java.text.NumberFormat;
44 private NumberFormat wholeFormat;
60 public ProperBigFractionFormat(final NumberFormat format) { in ProperBigFractionFormat()
61 this(format, (NumberFormat)format.clone(), (NumberFormat)format.clone()); in ProperBigFractionFormat()
71 public ProperBigFractionFormat(final NumberFormat wholeFormat, in ProperBigFractionFormat()
72 final NumberFormat numeratorFormat, in ProperBigFractionFormat()
73 final NumberFormat denominatorFormat) { in ProperBigFractionFormat()
118 public NumberFormat getWholeFormat() { in getWholeFormat()
233 public void setWholeFormat(final NumberFormat format) {
/external/icu/icu4c/source/test/intltest/
Dnmfmapts.cpp69 NumberFormat *def = NumberFormat::createInstance(status); in testAPI()
75 NumberFormat *fr = NumberFormat::createInstance(Locale::getFrench(), status); in testAPI()
80 NumberFormat *cur = NumberFormat::createCurrencyInstance(status); in testAPI()
86 NumberFormat *cur_fr = NumberFormat::createCurrencyInstance(Locale::getFrench(), status); in testAPI()
91 NumberFormat *per = NumberFormat::createPercentInstance(status); in testAPI()
97 NumberFormat *per_fr = NumberFormat::createPercentInstance(Locale::getFrench(), status); in testAPI()
190 const Locale *locales = NumberFormat::getAvailableLocales(count); in testAPI()
233 NumberFormat *test = new DecimalFormat(status); in testAPI()
257 NumberFormat* currencyStyle;
264 currencyStyle = NumberFormat::createInstance(SWAP_LOC, status); in NFTestFactory()
[all …]
Dnumfmtst.h192 …void expectParseCurrency(const NumberFormat &fmt, const UChar* currency, double amount, const char…
202 void expect2(NumberFormat& fmt, const Formattable& n, const UnicodeString& str);
204 void expect3(NumberFormat& fmt, const Formattable& n, const UnicodeString& str);
206 void expect2(NumberFormat& fmt, const Formattable& n, const char* str) { in expect2()
210 void expect2(NumberFormat* fmt, const Formattable& n, const UnicodeString& str, UErrorCode ec);
212 void expect2(NumberFormat* fmt, const Formattable& n, const char* str, UErrorCode ec) { in expect2()
216 void expect(NumberFormat& fmt, const UnicodeString& str, const Formattable& n);
218 void expect(NumberFormat& fmt, const char *str, const Formattable& n) { in expect()
222 void expect(NumberFormat& fmt, const Formattable& n,
225 void expect(NumberFormat& fmt, const Formattable& n,
[all …]
/external/icu/icu4j/main/tests/localespi/src/com/ibm/icu/dev/test/localespi/
DNumberFormatTest.java11 import java.text.NumberFormat;
33 for (Locale loc : NumberFormat.getAvailableLocales()) { in TestGetInstance()
47 NumberFormat nf; in checkGetInstance()
62 NumberFormat nfIcu = null; in checkGetInstance()
78 private NumberFormat getJDKInstance(int type, Locale loc, String[] methodName) { in getJDKInstance()
79 NumberFormat nf = null; in getJDKInstance()
84 nf = NumberFormat.getInstance(loc); in getJDKInstance()
88 nf = NumberFormat.getNumberInstance(loc); in getJDKInstance()
92 nf = NumberFormat.getIntegerInstance(loc); in getJDKInstance()
96 nf = NumberFormat.getPercentInstance(loc); in getJDKInstance()
[all …]
/external/icu/icu4j/main/classes/localespi/src/com/ibm/icu/impl/javaspi/text/
DNumberFormatProviderICU.java9 import java.text.NumberFormat;
26 public NumberFormat getCurrencyInstance(Locale locale) { in getCurrencyInstance()
31 public NumberFormat getIntegerInstance(Locale locale) { in getIntegerInstance()
36 public NumberFormat getNumberInstance(Locale locale) { in getNumberInstance()
41 public NumberFormat getPercentInstance(Locale locale) { in getPercentInstance()
50 private NumberFormat getInstance(int type, Locale locale) { in getInstance()
51 com.ibm.icu.text.NumberFormat icuNfmt; in getInstance()
55 icuNfmt = com.ibm.icu.text.NumberFormat.getNumberInstance(actual); in getInstance()
58 icuNfmt = com.ibm.icu.text.NumberFormat.getIntegerInstance(actual); in getInstance()
61 icuNfmt = com.ibm.icu.text.NumberFormat.getCurrencyInstance(actual); in getInstance()
[all …]
/external/icu/icu4c/source/i18n/unicode/
Dnumfmt.h172 class U_I18N_API NumberFormat : public Format {
227 virtual ~NumberFormat();
686 static NumberFormat* U_EXPORT2 createInstance(UErrorCode&);
696 static NumberFormat* U_EXPORT2 createInstance(const Locale& inLocale,
707 static NumberFormat* U_EXPORT2 createInstance(const Locale& desiredLocale,
718 static NumberFormat* internalCreateInstance(
739 static NumberFormat* U_EXPORT2 createCurrencyInstance(UErrorCode&);
746 static NumberFormat* U_EXPORT2 createCurrencyInstance(const Locale& inLocale,
753 static NumberFormat* U_EXPORT2 createPercentInstance(UErrorCode&);
760 static NumberFormat* U_EXPORT2 createPercentInstance(const Locale& inLocale,
[all …]
/external/apache-commons-math/src/main/java/org/apache/commons/math/complex/
DComplexFormat.java21 import java.text.NumberFormat;
50 private NumberFormat imaginaryFormat;
53 private NumberFormat realFormat;
68 public ComplexFormat(NumberFormat format) { in ComplexFormat()
78 public ComplexFormat(NumberFormat realFormat, NumberFormat imaginaryFormat) { in ComplexFormat()
97 public ComplexFormat(String imaginaryCharacter, NumberFormat format) { in ComplexFormat()
98 this(imaginaryCharacter, format, (NumberFormat)format.clone()); in ComplexFormat()
109 public ComplexFormat(String imaginaryCharacter, NumberFormat realFormat, in ComplexFormat()
110 NumberFormat imaginaryFormat) { in ComplexFormat()
123 return NumberFormat.getAvailableLocales(); in getAvailableLocales()
[all …]
/external/v8/test/intl/general/
Dmapped-locale.js30 var nf = Intl.NumberFormat(['zh-TW'], {localeMatcher: 'lookup'});
33 var nf = Intl.NumberFormat(['zh-Hant-TW'], {localeMatcher: 'lookup'});
36 var nf = Intl.NumberFormat(['zh-Hant'], {localeMatcher: 'lookup'});
39 nf = Intl.NumberFormat(['zh'], {localeMatcher: 'lookup'});
42 nf = Intl.NumberFormat(['zh-CN'], {localeMatcher: 'lookup'});
45 nf = Intl.NumberFormat(['zh-Hans-CN'], {localeMatcher: 'lookup'});
48 nf = Intl.NumberFormat(['zh-Hans'], {localeMatcher: 'lookup'});
51 nf = Intl.NumberFormat(['en-US'], {localeMatcher: 'lookup'});
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
DNumberFormat.java170 public abstract class NumberFormat extends UFormat { class
555 public final static NumberFormat getInstance() { in getInstance()
566 public static NumberFormat getInstance(Locale inLocale) { in getInstance()
577 public static NumberFormat getInstance(ULocale inLocale) { in getInstance()
587 public final static NumberFormat getInstance(int style) { in getInstance()
597 public static NumberFormat getInstance(Locale inLocale, int style) { in getInstance()
607 public final static NumberFormat getNumberInstance() { in getNumberInstance()
615 public static NumberFormat getNumberInstance(Locale inLocale) { in getNumberInstance()
623 public static NumberFormat getNumberInstance(ULocale inLocale) { in getNumberInstance()
640 public final static NumberFormat getIntegerInstance() { in getIntegerInstance()
[all …]
DNumberFormatServiceShim.java21 import com.ibm.icu.text.NumberFormat.NumberFormatFactory;
25 class NumberFormatServiceShim extends NumberFormat.NumberFormatShim {
76 NumberFormat createInstance(ULocale desiredLocale, int choice) { in createInstance()
84 NumberFormat fmt = (NumberFormat)service.get(desiredLocale, choice, in createInstance()
89 fmt = (NumberFormat)fmt.clone(); in createInstance()
93 if ( choice == NumberFormat.CURRENCYSTYLE || in createInstance()
94 choice == NumberFormat.ISOCURRENCYSTYLE || in createInstance()
95 choice == NumberFormat.PLURALCURRENCYSTYLE) { in createInstance()
110 return NumberFormat.createInstance(loc, kind); in NFService()
/external/icu/icu4j/main/tests/framework/src/com/ibm/icu/dev/util/
DElapsedTimer.java13 import com.ibm.icu.text.NumberFormat;
45 private NumberFormat myDurationFormat = null;
55 public ElapsedTimer(NumberFormat aNumFmt) { in ElapsedTimer()
59 public ElapsedTimer(MessageFormat aMsgFmt, NumberFormat aNumFmt) { in ElapsedTimer()
68 public ElapsedTimer(String pattern, NumberFormat aNumFmt) { in ElapsedTimer()
86 private static NumberFormat gFormat = null;
88 private static NumberFormat getFormat() { in getFormat()
96 private static String diffTime(NumberFormat fmt, long start, long end) { in diffTime()
/external/icu/icu4j/main/classes/localespi/src/com/ibm/icu/impl/jdkadapter/
DDecimalFormatICU.java22 import com.ibm.icu.text.NumberFormat;
423 if (icuAttribute == NumberFormat.Field.CURRENCY) { in mapAttribute()
424 jdkAttribute = java.text.NumberFormat.Field.CURRENCY; in mapAttribute()
425 } else if (icuAttribute == NumberFormat.Field.DECIMAL_SEPARATOR) { in mapAttribute()
426 jdkAttribute = java.text.NumberFormat.Field.DECIMAL_SEPARATOR; in mapAttribute()
427 } else if (icuAttribute == NumberFormat.Field.EXPONENT) { in mapAttribute()
428 jdkAttribute = java.text.NumberFormat.Field.EXPONENT; in mapAttribute()
429 } else if (icuAttribute == NumberFormat.Field.EXPONENT_SIGN) { in mapAttribute()
430 jdkAttribute = java.text.NumberFormat.Field.EXPONENT_SIGN; in mapAttribute()
431 } else if (icuAttribute == NumberFormat.Field.EXPONENT_SYMBOL) { in mapAttribute()
[all …]

12345678