/external/icu/icu4j/eclipse-build/plugins.template/com.ibm.icu.base.tests/src/com/ibm/icu/tests/ |
D | NumberFormatTest.java | 16 import com.ibm.icu.text.NumberFormat; 25 NumberFormat nf = new NumberFormat(java.text.NumberFormat.getInstance()); in testNumberFormat() 26 assertEquals(nf, NumberFormat.getInstance()); in testNumberFormat() 35 FieldPosition fp = new FieldPosition(NumberFormat.INTEGER_FIELD); in testFormatObjectStringBufferFieldPosition() 36 NumberFormat.getInstance().format(num, buf, fp); in testFormatObjectStringBufferFieldPosition() 47 Object result = NumberFormat.getInstance().parse("1,234", pp); in testParseObjectStringParsePosition() 55 assertEquals("1,234.567", NumberFormat.getInstance().format(1234.567)); in testFormatDouble() 62 assertEquals("1,234", NumberFormat.getInstance().format(1234L)); in testFormatLong() 71 assertEquals("123,456", java.text.NumberFormat.getInstance().format(bi)); in testFormatBigInteger() 79 FieldPosition fp = new FieldPosition(NumberFormat.FRACTION_FIELD); in testFormatDoubleStringBufferFieldPosition() [all …]
|
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/ |
D | NumberFormatRegistrationTest.java | 12 import android.icu.text.NumberFormat; 13 import android.icu.text.NumberFormat.SimpleNumberFormatFactory; 30 NumberFormat currencyStyle; in TestRegistration() 38 currencyStyle = NumberFormat.getIntegerInstance(swapLoc); in TestRegistration() 41 public NumberFormat createFormat(ULocale loc, int formatType) { in TestRegistration() 53 NumberFormat.unregister(null); in TestRegistration() 61 NumberFormat.registerFactory(null); in TestRegistration() 73 if (NumberFormat.unregister("")) { in TestRegistration() 82 NumberFormat f0 = NumberFormat.getIntegerInstance(SWAP_LOC); in TestRegistration() 83 NumberFormat f1 = NumberFormat.getIntegerInstance(SRC_LOC); in TestRegistration() [all …]
|
D | IntlTestDecimalFormatAPIC.java | 28 import android.icu.text.NumberFormat; 76 … cust2 = new DecimalFormat(pattern, symbols, infoInput, NumberFormat.PLURALCURRENCYSTYLE); in TestAPI() 312 t_Format(1, number, NumberFormat.getNumberInstance(us), in testFormatToCharacterIterator() 316 t_Format(3, number, NumberFormat.getPercentInstance(us), in testFormatToCharacterIterator() 332 t_Format(7, number, NumberFormat.getCurrencyInstance(us), in testFormatToCharacterIterator() 336 t_Format(8, negativeNumber, NumberFormat.getCurrencyInstance(us), in testFormatToCharacterIterator() 341 t_Format(11, number, NumberFormat.getNumberInstance(us), in testFormatToCharacterIterator() 346 t_Format(12, number, NumberFormat.getNumberInstance(us), in testFormatToCharacterIterator() 352 v.add(new FieldContainer(0, 3, NumberFormat.Field.INTEGER)); in getNumberVectorUS() 353 v.add(new FieldContainer(3, 4, NumberFormat.Field.DECIMAL_SEPARATOR)); in getNumberVectorUS() [all …]
|
D | IntlTestNumberFormatAPI.java | 25 import android.icu.text.NumberFormat; 47 NumberFormat def = NumberFormat.getInstance(); in TestAPI() 49 NumberFormat fr = NumberFormat.getInstance(Locale.FRENCH); in TestAPI() 51 NumberFormat cur = NumberFormat.getCurrencyInstance(); in TestAPI() 53 NumberFormat cur_fr = NumberFormat.getCurrencyInstance(Locale.FRENCH); in TestAPI() 55 NumberFormat per = NumberFormat.getPercentInstance(); in TestAPI() 57 NumberFormat per_fr = NumberFormat.getPercentInstance(Locale.FRENCH); in TestAPI() 59 NumberFormat integer = NumberFormat.getIntegerInstance(); in TestAPI() 61 NumberFormat int_fr = NumberFormat.getIntegerInstance(Locale.FRENCH); in TestAPI() 153 final Locale[] locales = NumberFormat.getAvailableLocales(); in TestAPI() [all …]
|
D | NumberFormatRegressionTest.java | 27 import android.icu.text.NumberFormat; 47 NumberFormat nf = NumberFormat.getInstance(Locale.US); in Test4161100() 75 NumberFormat nf = NumberFormat.getInstance(loc); in TestJ691() 107 NumberFormat nf1 = NumberFormat.getIntegerInstance(); in Test4408066() 108 NumberFormat nf2 = NumberFormat.getIntegerInstance(Locale.CHINA); in Test4408066() 182 NumberFormat format = (NumberFormat) ois.readObject(); in TestSerialization() 278 NumberFormat nfmt = NumberFormat.getInstance(); in TestT5698() 306 NumberFormat nfmt = NumberFormat.getInstance(); in TestSurrogatesParsing() 321 void checkNBSPPatternRtNum(String testcase, NumberFormat nf, double myNumber) { in checkNBSPPatternRtNum() 339 void checkNBSPPatternRT(String testcase, NumberFormat nf) { in checkNBSPPatternRT() [all …]
|
D | NumberFormatTest.java | 40 import android.icu.text.NumberFormat; 41 import android.icu.text.NumberFormat.NumberFormatFactory; 42 import android.icu.text.NumberFormat.SimpleNumberFormatFactory; 575 NumberFormat nff = NumberFormat.getNumberInstance(ULocale.ENGLISH); in Test10419RoundingWith0FractionDigits() 584 DecimalFormat parser = (DecimalFormat) NumberFormat.getInstance(new ULocale("fa")); in TestParseNegativeWithFaLocale() 594 DecimalFormat parser = (DecimalFormat) NumberFormat.getInstance(new ULocale("en")); in TestParseNegativeWithAlternativeMinusSign() 619 String s = ((NumberFormat)fmt).format(0); in TestPatterns() 627 s = ((NumberFormat)fmt).format(BigInteger.ZERO); in TestPatterns() 688 s = ((NumberFormat) fmt).format(val[v]); in TestExponential() 703 s = ((NumberFormat) fmt).format(lval[v]); in TestExponential() [all …]
|
D | NumberFormatRoundTripTest.java | 20 import android.icu.text.NumberFormat; 45 NumberFormat fmt = null; in TestNumberFormatRoundTrip() 50 fmt = NumberFormat.getInstance(); in TestNumberFormatRoundTrip() 54 fmt = NumberFormat.getCurrencyInstance(); in TestNumberFormatRoundTrip() 58 fmt = NumberFormat.getPercentInstance(); in TestNumberFormatRoundTrip() 63 final Locale[] loc = NumberFormat.getAvailableLocales(); in TestNumberFormatRoundTrip() 72 fmt = NumberFormat.getInstance(loc[i]); in TestNumberFormatRoundTrip() 75 fmt = NumberFormat.getCurrencyInstance(loc[i]); in TestNumberFormatRoundTrip() 78 fmt = NumberFormat.getPercentInstance(loc[i]); in TestNumberFormatRoundTrip() 96 public void _test(NumberFormat fmt) { in _test() [all …]
|
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/ |
D | NumberFormatRegistrationTest.java | 11 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 …]
|
D | IntlTestDecimalFormatAPIC.java | 27 import com.ibm.icu.text.NumberFormat; 72 … cust2 = new DecimalFormat(pattern, symbols, infoInput, NumberFormat.PLURALCURRENCYSTYLE); in TestAPI() 308 t_Format(1, number, NumberFormat.getNumberInstance(us), in testFormatToCharacterIterator() 312 t_Format(3, number, NumberFormat.getPercentInstance(us), in testFormatToCharacterIterator() 328 t_Format(7, number, NumberFormat.getCurrencyInstance(us), in testFormatToCharacterIterator() 332 t_Format(8, negativeNumber, NumberFormat.getCurrencyInstance(us), in testFormatToCharacterIterator() 337 t_Format(11, number, NumberFormat.getNumberInstance(us), in testFormatToCharacterIterator() 342 t_Format(12, number, NumberFormat.getNumberInstance(us), in testFormatToCharacterIterator() 348 v.add(new FieldContainer(0, 3, NumberFormat.Field.INTEGER)); in getNumberVectorUS() 349 v.add(new FieldContainer(3, 4, NumberFormat.Field.DECIMAL_SEPARATOR)); in getNumberVectorUS() [all …]
|
D | IntlTestNumberFormatAPI.java | 24 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 …]
|
D | NumberFormatRegressionTest.java | 26 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 …]
|
D | NumberFormatTest.java | 39 import com.ibm.icu.text.NumberFormat; 40 import com.ibm.icu.text.NumberFormat.NumberFormatFactory; 41 import com.ibm.icu.text.NumberFormat.SimpleNumberFormatFactory; 571 NumberFormat nff = NumberFormat.getNumberInstance(ULocale.ENGLISH); in Test10419RoundingWith0FractionDigits() 580 DecimalFormat parser = (DecimalFormat) NumberFormat.getInstance(new ULocale("fa")); in TestParseNegativeWithFaLocale() 590 DecimalFormat parser = (DecimalFormat) NumberFormat.getInstance(new ULocale("en")); in TestParseNegativeWithAlternativeMinusSign() 615 String s = ((NumberFormat)fmt).format(0); in TestPatterns() 623 s = ((NumberFormat)fmt).format(BigInteger.ZERO); in TestPatterns() 684 s = ((NumberFormat) fmt).format(val[v]); in TestExponential() 699 s = ((NumberFormat) fmt).format(lval[v]); in TestExponential() [all …]
|
/external/icu/icu4j/eclipse-build/plugins.template/com.ibm.icu.base/src/com/ibm/icu/text/ |
D | NumberFormat.java | 160 public class NumberFormat extends Format { class 166 public final java.text.NumberFormat numberFormat; 172 public NumberFormat(java.text.NumberFormat delegate) { in NumberFormat() method in NumberFormat 518 public final static NumberFormat getInstance() { in getInstance() 529 public static NumberFormat getInstance(Locale inLocale) { in getInstance() 540 public static NumberFormat getInstance(ULocale inLocale) { in getInstance() 549 public final static NumberFormat getInstance(int style) { in getInstance() 559 public static NumberFormat getInstance(Locale inLocale, int style) { in getInstance() 568 public final static NumberFormat getNumberInstance() { in getNumberInstance() 576 public static NumberFormat getNumberInstance(Locale inLocale) { in getNumberInstance() [all …]
|
/external/icu/icu4c/source/i18n/ |
D | numfmt.cpp | 105 const int32_t icu::NumberFormat::gDefaultMaxIntegerDigits = 2000000000; 106 const int32_t icu::NumberFormat::gDefaultMinIntegerDigits = 127; 200 UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION(NumberFormat) in UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION() argument 232 NumberFormat::NumberFormat() in NumberFormat() function in NumberFormat 247 NumberFormat::~NumberFormat() in ~NumberFormat() 258 NumberFormat::NumberFormat(const NumberFormat &source) in NumberFormat() function in NumberFormat 267 NumberFormat& 268 NumberFormat::operator=(const NumberFormat& rhs) in operator =() 289 NumberFormat::operator==(const Format& that) const in operator ==() 292 NumberFormat* other = (NumberFormat*)&that; in operator ==() [all …]
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/fraction/ |
D | AbstractFormat.java | 22 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 …]
|
/external/icu/icu4c/source/test/intltest/ |
D | nmfmapts.cpp | 69 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 …]
|
D | numfmtst.h | 220 …void expectParseCurrency(const NumberFormat &fmt, const UChar* currency, double amount, const char… 230 void expect2(NumberFormat& fmt, const Formattable& n, const UnicodeString& str); 232 void expect3(NumberFormat& fmt, const Formattable& n, const UnicodeString& str); 234 void expect2(NumberFormat& fmt, const Formattable& n, const char* str) { in expect2() 238 void expect2(NumberFormat* fmt, const Formattable& n, const UnicodeString& str, UErrorCode ec); 240 void expect2(NumberFormat* fmt, const Formattable& n, const char* str, UErrorCode ec) { in expect2() 244 void expect(NumberFormat& fmt, const UnicodeString& str, const Formattable& n); 246 void expect(NumberFormat& fmt, const char *str, const Formattable& n) { in expect() 250 void expect(NumberFormat& fmt, const Formattable& n, 253 void expect(NumberFormat& fmt, const Formattable& n, [all …]
|
/external/icu/icu4j/main/tests/localespi/src/com/ibm/icu/dev/test/localespi/ |
D | NumberFormatTest.java | 11 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/ |
D | NumberFormatProviderICU.java | 9 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/ |
D | numfmt.h | 172 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/ |
D | ComplexFormat.java | 21 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/ |
D | mapped-locale.js | 30 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/android_icu4j/src/main/java/android/icu/text/ |
D | NumberFormatServiceShim.java | 22 import android.icu.text.NumberFormat.NumberFormatFactory; 26 class NumberFormatServiceShim extends NumberFormat.NumberFormatShim { 77 NumberFormat createInstance(ULocale desiredLocale, int choice) { in createInstance() 85 NumberFormat fmt = (NumberFormat)service.get(desiredLocale, choice, in createInstance() 90 fmt = (NumberFormat)fmt.clone(); in createInstance() 94 if ( choice == NumberFormat.CURRENCYSTYLE || in createInstance() 95 choice == NumberFormat.ISOCURRENCYSTYLE || in createInstance() 96 choice == NumberFormat.PLURALCURRENCYSTYLE) { in createInstance() 111 return NumberFormat.createInstance(loc, kind); in NFService()
|
D | NumberFormat.java | 169 public abstract class NumberFormat extends UFormat { class 528 public final static NumberFormat getInstance() { in getInstance() 538 public static NumberFormat getInstance(Locale inLocale) { in getInstance() 548 public static NumberFormat getInstance(ULocale inLocale) { in getInstance() 557 public final static NumberFormat getInstance(int style) { in getInstance() 566 public static NumberFormat getInstance(Locale inLocale, int style) { in getInstance() 575 public final static NumberFormat getNumberInstance() { in getNumberInstance() 582 public static NumberFormat getNumberInstance(Locale inLocale) { in getNumberInstance() 589 public static NumberFormat getNumberInstance(ULocale inLocale) { in getNumberInstance() 605 public final static NumberFormat getIntegerInstance() { in getIntegerInstance() [all …]
|
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/ |
D | NumberFormat.java | 169 public abstract class NumberFormat extends UFormat { class 564 public final static NumberFormat getInstance() { in getInstance() 575 public static NumberFormat getInstance(Locale inLocale) { in getInstance() 586 public static NumberFormat getInstance(ULocale inLocale) { in getInstance() 596 public final static NumberFormat getInstance(int style) { in getInstance() 606 public static NumberFormat getInstance(Locale inLocale, int style) { in getInstance() 616 public final static NumberFormat getNumberInstance() { in getNumberInstance() 624 public static NumberFormat getNumberInstance(Locale inLocale) { in getNumberInstance() 632 public static NumberFormat getNumberInstance(ULocale inLocale) { in getNumberInstance() 649 public final static NumberFormat getIntegerInstance() { in getIntegerInstance() [all …]
|