/external/icu/icu4j/eclipse-build/plugins.template/com.ibm.icu.base.tests/src/com/ibm/icu/tests/ |
D | NumberFormatTest.java | 18 import com.ibm.icu.text.NumberFormat; 27 NumberFormat nf = new NumberFormat(java.text.NumberFormat.getInstance()); in testNumberFormat() 28 assertEquals(nf, NumberFormat.getInstance()); in testNumberFormat() 37 FieldPosition fp = new FieldPosition(NumberFormat.INTEGER_FIELD); in testFormatObjectStringBufferFieldPosition() 38 NumberFormat.getInstance().format(num, buf, fp); in testFormatObjectStringBufferFieldPosition() 49 Object result = NumberFormat.getInstance().parse("1,234", pp); in testParseObjectStringParsePosition() 57 assertEquals("1,234.567", NumberFormat.getInstance().format(1234.567)); in testFormatDouble() 64 assertEquals("1,234", NumberFormat.getInstance().format(1234L)); in testFormatLong() 73 assertEquals("123,456", java.text.NumberFormat.getInstance().format(bi)); in testFormatBigInteger() 81 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 | 19 import android.icu.text.NumberFormat; 20 import android.icu.text.NumberFormat.SimpleNumberFormatFactory; 33 NumberFormat currencyStyle; in TestRegistration() 41 currencyStyle = NumberFormat.getIntegerInstance(swapLoc); in TestRegistration() 45 public NumberFormat createFormat(ULocale loc, int formatType) { in TestRegistration() 57 NumberFormat.unregister(null); in TestRegistration() 65 NumberFormat.registerFactory(null); in TestRegistration() 77 if (NumberFormat.unregister("")) { in TestRegistration() 86 NumberFormat f0 = NumberFormat.getIntegerInstance(SWAP_LOC); in TestRegistration() 87 NumberFormat f1 = NumberFormat.getIntegerInstance(SRC_LOC); in TestRegistration() [all …]
|
D | IntlTestDecimalFormatAPIC.java | 35 import android.icu.text.NumberFormat; 81 … cust2 = new DecimalFormat(pattern, symbols, infoInput, NumberFormat.PLURALCURRENCYSTYLE); in TestAPI() 315 t_Format(1, number, NumberFormat.getNumberInstance(us), in testFormatToCharacterIterator() 319 t_Format(3, number, NumberFormat.getPercentInstance(us), in testFormatToCharacterIterator() 335 t_Format(7, number, NumberFormat.getCurrencyInstance(us), in testFormatToCharacterIterator() 339 t_Format(8, negativeNumber, NumberFormat.getCurrencyInstance(us), in testFormatToCharacterIterator() 344 t_Format(11, number, NumberFormat.getNumberInstance(us), in testFormatToCharacterIterator() 349 t_Format(12, number, NumberFormat.getNumberInstance(us), in testFormatToCharacterIterator() 355 v.add(new FieldContainer(0, 3, NumberFormat.Field.INTEGER)); in getNumberVectorUS() 356 v.add(new FieldContainer(3, 4, NumberFormat.Field.DECIMAL_SEPARATOR)); in getNumberVectorUS() [all …]
|
D | IntlTestNumberFormatAPI.java | 32 import android.icu.text.NumberFormat; 51 NumberFormat def = NumberFormat.getInstance(); in TestAPI() 53 NumberFormat fr = NumberFormat.getInstance(Locale.FRENCH); in TestAPI() 55 NumberFormat cur = NumberFormat.getCurrencyInstance(); in TestAPI() 57 NumberFormat cur_fr = NumberFormat.getCurrencyInstance(Locale.FRENCH); in TestAPI() 59 NumberFormat per = NumberFormat.getPercentInstance(); in TestAPI() 61 NumberFormat per_fr = NumberFormat.getPercentInstance(Locale.FRENCH); in TestAPI() 63 NumberFormat integer = NumberFormat.getIntegerInstance(); in TestAPI() 65 NumberFormat int_fr = NumberFormat.getIntegerInstance(Locale.FRENCH); in TestAPI() 157 final Locale[] locales = NumberFormat.getAvailableLocales(); in TestAPI() [all …]
|
D | NumberFormatTest.java | 59 import android.icu.text.NumberFormat; 60 import android.icu.text.NumberFormat.NumberFormatFactory; 61 import android.icu.text.NumberFormat.SimpleNumberFormatFactory; 197 NumberFormat nff = NumberFormat.getNumberInstance(ULocale.ENGLISH); in Test10419RoundingWith0FractionDigits() 207 DecimalFormat parser = (DecimalFormat) NumberFormat.getInstance(new ULocale("fa")); in TestParseNegativeWithFaLocale() 218 DecimalFormat parser = (DecimalFormat) NumberFormat.getInstance(new ULocale("en")); in TestParseNegativeWithAlternativeMinusSign() 244 String s = ((NumberFormat)fmt).format(0); in TestPatterns() 252 s = ((NumberFormat)fmt).format(BigInteger.ZERO); in TestPatterns() 314 s = ((NumberFormat) fmt).format(val[v]); in TestExponential() 329 s = ((NumberFormat) fmt).format(lval[v]); in TestExponential() [all …]
|
D | NumberFormatRegressionTest.java | 34 import android.icu.text.NumberFormat; 50 NumberFormat nf = NumberFormat.getInstance(Locale.US); in Test4161100() 79 NumberFormat nf = NumberFormat.getInstance(loc); in TestJ691() 115 NumberFormat nf1 = NumberFormat.getIntegerInstance(); in Test4408066() 116 NumberFormat nf2 = NumberFormat.getIntegerInstance(Locale.CHINA); in Test4408066() 191 NumberFormat format = (NumberFormat) ois.readObject(); in TestSerialization() 286 NumberFormat nfmt = NumberFormat.getInstance(); in TestT5698() 315 NumberFormat nfmt = NumberFormat.getInstance(); in TestSurrogatesParsing() 330 void checkNBSPPatternRtNum(String testcase, NumberFormat nf, double myNumber) { in checkNBSPPatternRtNum() 348 void checkNBSPPatternRT(String testcase, NumberFormat nf) { in checkNBSPPatternRT() [all …]
|
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/ |
D | NumberFormatRegistrationTest.java | 18 import com.ibm.icu.text.NumberFormat; 19 import com.ibm.icu.text.NumberFormat.SimpleNumberFormatFactory; 30 NumberFormat currencyStyle; in TestRegistration() 38 currencyStyle = NumberFormat.getIntegerInstance(swapLoc); in TestRegistration() 42 public NumberFormat createFormat(ULocale loc, int formatType) { in TestRegistration() 54 NumberFormat.unregister(null); in TestRegistration() 62 NumberFormat.registerFactory(null); in TestRegistration() 74 if (NumberFormat.unregister("")) { in TestRegistration() 83 NumberFormat f0 = NumberFormat.getIntegerInstance(SWAP_LOC); in TestRegistration() 84 NumberFormat f1 = NumberFormat.getIntegerInstance(SRC_LOC); in TestRegistration() [all …]
|
D | IntlTestDecimalFormatAPIC.java | 34 import com.ibm.icu.text.NumberFormat; 78 … 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 | 31 import com.ibm.icu.text.NumberFormat; 48 NumberFormat def = NumberFormat.getInstance(); in TestAPI() 50 NumberFormat fr = NumberFormat.getInstance(Locale.FRENCH); in TestAPI() 52 NumberFormat cur = NumberFormat.getCurrencyInstance(); in TestAPI() 54 NumberFormat cur_fr = NumberFormat.getCurrencyInstance(Locale.FRENCH); in TestAPI() 56 NumberFormat per = NumberFormat.getPercentInstance(); in TestAPI() 58 NumberFormat per_fr = NumberFormat.getPercentInstance(Locale.FRENCH); in TestAPI() 60 NumberFormat integer = NumberFormat.getIntegerInstance(); in TestAPI() 62 NumberFormat int_fr = NumberFormat.getIntegerInstance(Locale.FRENCH); in TestAPI() 154 final Locale[] locales = NumberFormat.getAvailableLocales(); in TestAPI() [all …]
|
D | NumberFormatTest.java | 58 import com.ibm.icu.text.NumberFormat; 59 import com.ibm.icu.text.NumberFormat.NumberFormatFactory; 60 import com.ibm.icu.text.NumberFormat.SimpleNumberFormatFactory; 194 NumberFormat nff = NumberFormat.getNumberInstance(ULocale.ENGLISH); in Test10419RoundingWith0FractionDigits() 204 DecimalFormat parser = (DecimalFormat) NumberFormat.getInstance(new ULocale("fa")); in TestParseNegativeWithFaLocale() 215 DecimalFormat parser = (DecimalFormat) NumberFormat.getInstance(new ULocale("en")); in TestParseNegativeWithAlternativeMinusSign() 241 String s = ((NumberFormat)fmt).format(0); in TestPatterns() 249 s = ((NumberFormat)fmt).format(BigInteger.ZERO); in TestPatterns() 311 s = ((NumberFormat) fmt).format(val[v]); in TestExponential() 326 s = ((NumberFormat) fmt).format(lval[v]); in TestExponential() [all …]
|
D | NumberFormatRegressionTest.java | 33 import com.ibm.icu.text.NumberFormat; 47 NumberFormat nf = NumberFormat.getInstance(Locale.US); in Test4161100() 76 NumberFormat nf = NumberFormat.getInstance(loc); in TestJ691() 112 NumberFormat nf1 = NumberFormat.getIntegerInstance(); in Test4408066() 113 NumberFormat nf2 = NumberFormat.getIntegerInstance(Locale.CHINA); in Test4408066() 188 NumberFormat format = (NumberFormat) ois.readObject(); in TestSerialization() 283 NumberFormat nfmt = NumberFormat.getInstance(); in TestT5698() 312 NumberFormat nfmt = NumberFormat.getInstance(); in TestSurrogatesParsing() 327 void checkNBSPPatternRtNum(String testcase, NumberFormat nf, double myNumber) { in checkNBSPPatternRtNum() 345 void checkNBSPPatternRT(String testcase, NumberFormat nf) { in checkNBSPPatternRT() [all …]
|
/external/icu/icu4c/source/i18n/ |
D | numfmt.cpp | 108 const int32_t icu::NumberFormat::gDefaultMaxIntegerDigits = 2000000000; 109 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 =() 290 NumberFormat::operator==(const Format& that) const in operator ==() 293 NumberFormat* other = (NumberFormat*)&that; in operator ==() [all …]
|
D | unum.cpp | 51 NumberFormat *retVal = NULL; in unum_open() 63 retVal = NumberFormat::createInstance(Locale(locale), style, *status); in unum_open() 144 delete (NumberFormat*) fmt; in unum_close() 155 const NumberFormat* nf = reinterpret_cast<const NumberFormat*>(fmt); in unum_clone() 207 ((const NumberFormat*)fmt)->format(number, res, fp, *status); in unum_formatInt64() 240 ((const NumberFormat*)fmt)->format(number, res, fp, *status); in unum_formatDouble() 273 ((const NumberFormat*)format)->format(number, res, (FieldPositionIterator*)fpositer, *status); in unum_formatDoubleForFields() 311 ((const NumberFormat*)fmt)->format(numFmtbl, resultStr, fp, *status); in unum_formatDecimal() 350 ((const NumberFormat*)fmt)->format(n, res, fp, *status); in unum_formatDoubleCurrency() 377 ((const NumberFormat*)fmt)->parse(src, res, pp); in parseRes() [all …]
|
/external/icu/icu4j/eclipse-build/plugins.template/com.ibm.icu.base/src/com/ibm/icu/text/ |
D | NumberFormat.java | 162 public class NumberFormat extends Format { class 168 public final java.text.NumberFormat numberFormat; 174 public NumberFormat(java.text.NumberFormat delegate) { in NumberFormat() method in NumberFormat 520 public final static NumberFormat getInstance() { in getInstance() 531 public static NumberFormat getInstance(Locale inLocale) { in getInstance() 542 public static NumberFormat getInstance(ULocale inLocale) { in getInstance() 551 public final static NumberFormat getInstance(int style) { in getInstance() 561 public static NumberFormat getInstance(Locale inLocale, int style) { in getInstance() 570 public final static NumberFormat getNumberInstance() { in getNumberInstance() 578 public static NumberFormat getNumberInstance(Locale inLocale) { in getNumberInstance() [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 | 71 NumberFormat *def = NumberFormat::createInstance(status); in testAPI() 77 NumberFormat *fr = NumberFormat::createInstance(Locale::getFrench(), status); in testAPI() 82 NumberFormat *cur = NumberFormat::createCurrencyInstance(status); in testAPI() 88 NumberFormat *cur_fr = NumberFormat::createCurrencyInstance(Locale::getFrench(), status); in testAPI() 93 NumberFormat *per = NumberFormat::createPercentInstance(status); in testAPI() 99 NumberFormat *per_fr = NumberFormat::createPercentInstance(Locale::getFrench(), status); in testAPI() 192 const Locale *locales = NumberFormat::getAvailableLocales(count); in testAPI() 235 NumberFormat *test = new DecimalFormat(status); in testAPI() 259 NumberFormat* currencyStyle; 266 currencyStyle = NumberFormat::createInstance(SWAP_LOC, status); in NFTestFactory() [all …]
|
D | numfmtst.h | 290 …void expectParseCurrency(const NumberFormat &fmt, const UChar* currency, double amount, const char… 300 void expect2(NumberFormat& fmt, const Formattable& n, const UnicodeString& str); 302 void expect3(NumberFormat& fmt, const Formattable& n, const UnicodeString& str); 304 void expect2(NumberFormat& fmt, const Formattable& n, const char* str) { in expect2() 308 void expect2(NumberFormat* fmt, const Formattable& n, const UnicodeString& str, UErrorCode ec); 310 void expect2(NumberFormat* fmt, const Formattable& n, const char* str, UErrorCode ec) { in expect2() 314 void expect(NumberFormat& fmt, const UnicodeString& str, const Formattable& n); 316 void expect(NumberFormat& fmt, const char *str, const Formattable& n) { in expect() 320 void expect(NumberFormat& fmt, const Formattable& n, 323 void expect(NumberFormat& fmt, const Formattable& n, [all …]
|
/external/icu/icu4j/main/tests/localespi/src/com/ibm/icu/dev/test/localespi/ |
D | NumberFormatTest.java | 13 import java.text.NumberFormat; 37 for (Locale loc : NumberFormat.getAvailableLocales()) { in TestGetInstance() 51 NumberFormat nf; in checkGetInstance() 66 NumberFormat nfIcu = null; in checkGetInstance() 82 private NumberFormat getJDKInstance(int type, Locale loc, String[] methodName) { in getJDKInstance() 83 NumberFormat nf = null; in getJDKInstance() 88 nf = NumberFormat.getInstance(loc); in getJDKInstance() 92 nf = NumberFormat.getNumberInstance(loc); in getJDKInstance() 96 nf = NumberFormat.getIntegerInstance(loc); in getJDKInstance() 100 nf = NumberFormat.getPercentInstance(loc); in getJDKInstance() [all …]
|
/external/icu/icu4j/main/classes/localespi/src/com/ibm/icu/impl/javaspi/text/ |
D | NumberFormatProviderICU.java | 11 import java.text.NumberFormat; 28 public NumberFormat getCurrencyInstance(Locale locale) { in getCurrencyInstance() 33 public NumberFormat getIntegerInstance(Locale locale) { in getIntegerInstance() 38 public NumberFormat getNumberInstance(Locale locale) { in getNumberInstance() 43 public NumberFormat getPercentInstance(Locale locale) { in getPercentInstance() 52 private NumberFormat getInstance(int type, Locale locale) { in getInstance() 53 com.ibm.icu.text.NumberFormat icuNfmt; in getInstance() 57 icuNfmt = com.ibm.icu.text.NumberFormat.getNumberInstance(actual); in getInstance() 60 icuNfmt = com.ibm.icu.text.NumberFormat.getIntegerInstance(actual); in getInstance() 63 icuNfmt = com.ibm.icu.text.NumberFormat.getCurrencyInstance(actual); in getInstance() [all …]
|
/external/icu/icu4c/source/i18n/unicode/ |
D | numfmt.h | 173 class U_I18N_API NumberFormat : public Format { 255 virtual ~NumberFormat(); 715 static NumberFormat* U_EXPORT2 createInstance(UErrorCode&); 726 static NumberFormat* U_EXPORT2 createInstance(const Locale& inLocale, 740 static NumberFormat* U_EXPORT2 createInstance(const Locale& desiredLocale, 751 static NumberFormat* internalCreateInstance( 775 static NumberFormat* U_EXPORT2 createCurrencyInstance(UErrorCode&); 785 static NumberFormat* U_EXPORT2 createCurrencyInstance(const Locale& inLocale, 795 static NumberFormat* U_EXPORT2 createPercentInstance(UErrorCode&); 805 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/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/number/ |
D | NumberStringBuilder.java | 12 import com.ibm.icu.text.NumberFormat; 13 import com.ibm.icu.text.NumberFormat.Field; 390 fieldToDebugChar.put(NumberFormat.Field.SIGN, '-'); 391 fieldToDebugChar.put(NumberFormat.Field.INTEGER, 'i'); 392 fieldToDebugChar.put(NumberFormat.Field.FRACTION, 'f'); 393 fieldToDebugChar.put(NumberFormat.Field.EXPONENT, 'e'); 394 fieldToDebugChar.put(NumberFormat.Field.EXPONENT_SIGN, '+'); 395 fieldToDebugChar.put(NumberFormat.Field.EXPONENT_SYMBOL, 'E'); 396 fieldToDebugChar.put(NumberFormat.Field.DECIMAL_SEPARATOR, '.'); 397 fieldToDebugChar.put(NumberFormat.Field.GROUPING_SEPARATOR, ','); [all …]
|
/external/icu/android_icu4j/src/main/java/android/icu/impl/number/ |
D | NumberStringBuilder.java | 13 import android.icu.text.NumberFormat; 14 import android.icu.text.NumberFormat.Field; 392 fieldToDebugChar.put(NumberFormat.Field.SIGN, '-'); 393 fieldToDebugChar.put(NumberFormat.Field.INTEGER, 'i'); 394 fieldToDebugChar.put(NumberFormat.Field.FRACTION, 'f'); 395 fieldToDebugChar.put(NumberFormat.Field.EXPONENT, 'e'); 396 fieldToDebugChar.put(NumberFormat.Field.EXPONENT_SIGN, '+'); 397 fieldToDebugChar.put(NumberFormat.Field.EXPONENT_SYMBOL, 'E'); 398 fieldToDebugChar.put(NumberFormat.Field.DECIMAL_SEPARATOR, '.'); 399 fieldToDebugChar.put(NumberFormat.Field.GROUPING_SEPARATOR, ','); [all …]
|
/external/icu/tools/srcgen/javadoc_patches/patches/src/main/java/android/icu/text/ |
D | NumberFormat.java.patch | 1 --- android_icu4j/src/main/java/android/icu/text/NumberFormat.java 2018-10-19 11:01:09.353895065 +0… 2 +++ android_icu4j/src/main/java/android/icu/text/NumberFormat.java 2018-10-19 11:01:28.681998885 +0… 9 * class, NumberFormat, is only provided for java.text.NumberFormat compatibility. 17 - * {@link NumberFormatter} instead of NumberFormat. 27 - * {@link NumberFormatter} instead of NumberFormat. 37 - * {@link NumberFormatter} instead of NumberFormat. 47 - * {@link NumberFormatter} instead of NumberFormat. 57 - * {@link NumberFormatter} instead of NumberFormat. 67 - * {@link NumberFormatter} instead of NumberFormat. 77 - * {@link NumberFormatter} instead of NumberFormat. [all …]
|
/external/icu/android_icu4j/src/main/java/android/icu/text/ |
D | NumberFormatServiceShim.java | 24 import android.icu.text.NumberFormat.NumberFormatFactory; 28 class NumberFormatServiceShim extends NumberFormat.NumberFormatShim { 79 NumberFormat createInstance(ULocale desiredLocale, int choice) { in createInstance() 87 NumberFormat fmt = (NumberFormat)service.get(desiredLocale, choice, in createInstance() 92 fmt = (NumberFormat)fmt.clone(); in createInstance() 96 if ( choice == NumberFormat.CURRENCYSTYLE || in createInstance() 97 choice == NumberFormat.ISOCURRENCYSTYLE || in createInstance() 98 choice == NumberFormat.PLURALCURRENCYSTYLE) { in createInstance() 113 return NumberFormat.createInstance(loc, kind); in NFService()
|