/external/icu/icu4c/source/i18n/ |
sharednumberformat.h | 19 class NumberFormat; 23 SharedNumberFormat(NumberFormat *nfToAdopt) : ptr(nfToAdopt) { } 25 const NumberFormat *get() const { return ptr; } 26 const NumberFormat *operator->() const { return ptr; } 27 const NumberFormat &operator*() const { return *ptr; } 29 NumberFormat *ptr;
|
numfmt.cpp | 107 const int32_t icu::NumberFormat::gDefaultMaxIntegerDigits = 2000000000; 108 const int32_t icu::NumberFormat::gDefaultMinIntegerDigits = 127; 159 // Static hashtable cache of NumberingSystem objects used by NumberFormat 197 // class NumberFormat 202 UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION(NumberFormat) 234 NumberFormat::NumberFormat() 249 NumberFormat::~NumberFormat() 260 NumberFormat::NumberFormat(const NumberFormat &source [all...] |
/external/icu/icu4j/eclipse-build/plugins.template/com.ibm.icu.base.tests/src/com/ibm/icu/tests/ |
NumberFormatTest.java | 18 import com.ibm.icu.text.NumberFormat; 24 * Test method for 'com.ibm.icu.x.text.NumberFormat.NumberFormat(NumberFormat)' 27 NumberFormat nf = new NumberFormat(java.text.NumberFormat.getInstance()); 28 assertEquals(nf, NumberFormat.getInstance()); 32 * Test method for 'com.ibm.icu.x.text.NumberFormat.format(Object, StringBuffer, FieldPosition)' 37 FieldPosition fp = new FieldPosition(NumberFormat.INTEGER_FIELD) [all...] |
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/ |
NumberFormatRegistrationTest.java | 16 import android.icu.text.NumberFormat; 17 import android.icu.text.NumberFormat.SimpleNumberFormatFactory; 27 NumberFormat currencyStyle; 35 currencyStyle = NumberFormat.getIntegerInstance(swapLoc); 38 public NumberFormat createFormat(ULocale loc, int formatType) { 50 NumberFormat.unregister(null); 58 NumberFormat.registerFactory(null); 70 if (NumberFormat.unregister("")) { 79 NumberFormat f0 = NumberFormat.getIntegerInstance(SWAP_LOC) [all...] |
IntlTestNumberFormatAPI.java | 29 import android.icu.text.NumberFormat; 38 logln("NumberFormat API test---"); logln(""); 43 logln("Testing NumberFormat constructors"); 45 NumberFormat def = NumberFormat.getInstance(); 47 NumberFormat fr = NumberFormat.getInstance(Locale.FRENCH); 49 NumberFormat cur = NumberFormat.getCurrencyInstance(); 51 NumberFormat cur_fr = NumberFormat.getCurrencyInstance(Locale.FRENCH) [all...] |
NumberFormatRegressionTest.java | 31 import android.icu.text.NumberFormat; 44 NumberFormat nf = NumberFormat.getInstance(Locale.US); 58 * NumberFormat objects. 72 // create a NumberFormat for this locale 73 NumberFormat nf = NumberFormat.getInstance(loc); 106 NumberFormat nf1 = NumberFormat.getIntegerInstance(); 107 NumberFormat nf2 = NumberFormat.getIntegerInstance(Locale.CHINA) [all...] |
WriteNumberFormatSerialTestData.java | 18 import android.icu.text.NumberFormat; 42 NumberFormat nf = NumberFormat.getInstance(Locale.US); 43 NumberFormat nfc = NumberFormat.getCurrencyInstance(Locale.US); 44 NumberFormat nfp = NumberFormat.getPercentInstance(Locale.US); 45 NumberFormat nfsp = NumberFormat.getScientificInstance(Locale.US); 50 write(file,(Object)nf,"generalInstance", "//NumberFormat.getInstance(Locale.US)") [all...] |
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/ |
NumberFormatRegistrationTest.java | 15 import com.ibm.icu.text.NumberFormat; 16 import com.ibm.icu.text.NumberFormat.SimpleNumberFormatFactory; 26 NumberFormat currencyStyle; 34 currencyStyle = NumberFormat.getIntegerInstance(swapLoc); 37 public NumberFormat createFormat(ULocale loc, int formatType) { 49 NumberFormat.unregister(null); 57 NumberFormat.registerFactory(null); 69 if (NumberFormat.unregister("")) { 78 NumberFormat f0 = NumberFormat.getIntegerInstance(SWAP_LOC) [all...] |
IntlTestNumberFormatAPI.java | 28 import com.ibm.icu.text.NumberFormat; 37 logln("NumberFormat API test---"); logln(""); 42 logln("Testing NumberFormat constructors"); 44 NumberFormat def = NumberFormat.getInstance(); 46 NumberFormat fr = NumberFormat.getInstance(Locale.FRENCH); 48 NumberFormat cur = NumberFormat.getCurrencyInstance(); 50 NumberFormat cur_fr = NumberFormat.getCurrencyInstance(Locale.FRENCH) [all...] |
NumberFormatRegressionTest.java | 30 import com.ibm.icu.text.NumberFormat; 43 NumberFormat nf = NumberFormat.getInstance(Locale.US); 57 * NumberFormat objects. 71 // create a NumberFormat for this locale 72 NumberFormat nf = NumberFormat.getInstance(loc); 105 NumberFormat nf1 = NumberFormat.getIntegerInstance(); 106 NumberFormat nf2 = NumberFormat.getIntegerInstance(Locale.CHINA) [all...] |
WriteNumberFormatSerialTestData.java | 17 import com.ibm.icu.text.NumberFormat; 41 NumberFormat nf = NumberFormat.getInstance(Locale.US); 42 NumberFormat nfc = NumberFormat.getCurrencyInstance(Locale.US); 43 NumberFormat nfp = NumberFormat.getPercentInstance(Locale.US); 44 NumberFormat nfsp = NumberFormat.getScientificInstance(Locale.US); 49 write(file,(Object)nf,"generalInstance", "//NumberFormat.getInstance(Locale.US)") [all...] |
/libcore/support/src/test/java/tests/support/ |
Support_DecimalFormat.java | 21 import java.text.NumberFormat; 42 DecimalFormat format = (DecimalFormat) NumberFormat 47 t_FormatWithField(0, format, number, text, NumberFormat.Field.CURRENCY, 49 t_FormatWithField(1, format, number, text, NumberFormat.Field.INTEGER, 52 NumberFormat.Field.GROUPING_SEPARATOR, 3, 4); 54 NumberFormat.Field.DECIMAL_SEPARATOR, 11, 12); 55 t_FormatWithField(4, format, number, text, NumberFormat.Field.FRACTION, 59 t_FormatWithField(5, format, number, text, NumberFormat.Field.SIGN, 0, 61 t_FormatWithField(6, format, number, text, NumberFormat.Field.EXPONENT, 64 NumberFormat.Field.EXPONENT_SIGN, 0, 0) [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
Support_DecimalFormat.java | 21 import java.text.NumberFormat; 41 DecimalFormat format = (DecimalFormat) NumberFormat.getCurrencyInstance(Locale.US); 45 t_FormatWithField(0, format, number, text, NumberFormat.Field.CURRENCY, 0, 1); 46 t_FormatWithField(1, format, number, text, NumberFormat.Field.INTEGER, 1, 11); 47 t_FormatWithField(2, format, number, text, NumberFormat.Field.GROUPING_SEPARATOR, 3, 4); 48 t_FormatWithField(3, format, number, text, NumberFormat.Field.DECIMAL_SEPARATOR, 11, 12); 49 t_FormatWithField(4, format, number, text, NumberFormat.Field.FRACTION, 12, 14); 52 t_FormatWithField(5, format, number, text, NumberFormat.Field.SIGN, 0, 0); 53 t_FormatWithField(6, format, number, text, NumberFormat.Field.EXPONENT, 0, 0); 54 t_FormatWithField(7, format, number, text, NumberFormat.Field.EXPONENT_SIGN, 0, 0) [all...] |
/libcore/luni/src/test/java/libcore/java/text/ |
NumberFormatTest.java | 24 import java.text.NumberFormat; 30 // NumberFormat.format(Object, StringBuffer, FieldPosition) guarantees it calls doubleValue for 42 NumberFormat nf = NumberFormat.getNumberInstance(Locale.US); 46 // NumberFormat.format(Object, StringBuffer, FieldPosition) guarantees it calls longValue for 49 class MyNumberFormat extends NumberFormat { 62 NumberFormat nf = new MyNumberFormat(); 72 NumberFormat numberFormat = NumberFormat.getNumberInstance(new Locale("ar")) [all...] |
OldNumberFormatTest.java | 22 import java.text.NumberFormat; 32 DecimalFormat format = (DecimalFormat) NumberFormat.getIntegerInstance(Locale.US); 42 format = (DecimalFormat) NumberFormat.getIntegerInstance(chLocale); 51 format = (DecimalFormat) NumberFormat.getIntegerInstance(arLocale); 66 NumberFormat format = NumberFormat.getInstance(); 78 NumberFormat format = NumberFormat.getInstance(new Locale("hu", "HU")); 86 ((NumberFormat) cformat).setCurrency(currA); 92 NumberFormat.getInstance().setCurrency(null) [all...] |
OldNumberFormatFieldTest.java | 25 import java.text.NumberFormat; 50 NumberFormat.Field nfield = NumberFormat.Field.CURRENCY; 58 NumberFormat.Field nfield2 = (NumberFormat.Field) in.readObject(); 71 static class MyNumberFormat extends NumberFormat.Field {
|
/external/icu/icu4j/main/classes/localespi/src/com/ibm/icu/impl/javaspi/text/ |
NumberFormatProviderICU.java | 11 import java.text.NumberFormat; 28 public NumberFormat getCurrencyInstance(Locale locale) { 33 public NumberFormat getIntegerInstance(Locale locale) { 38 public NumberFormat getNumberInstance(Locale locale) { 43 public NumberFormat getPercentInstance(Locale locale) { 52 private NumberFormat getInstance(int type, Locale locale) { 53 com.ibm.icu.text.NumberFormat icuNfmt; 57 icuNfmt = com.ibm.icu.text.NumberFormat.getNumberInstance(actual); 60 icuNfmt = com.ibm.icu.text.NumberFormat.getIntegerInstance(actual); 63 icuNfmt = com.ibm.icu.text.NumberFormat.getCurrencyInstance(actual) [all...] |
/external/snakeyaml/src/main/java/org/yaml/snakeyaml/serializer/ |
NumberAnchorGenerator.java | 20 import java.text.NumberFormat; 32 NumberFormat format = NumberFormat.getNumberInstance();
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/fraction/ |
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) { 59 this(format, (NumberFormat) format.clone()); 68 protected AbstractFormat(final NumberFormat numeratorFormat, 69 final NumberFormat denominatorFormat) { 76 * {@link NumberFormat#getNumberInstance(java.util.Locale)} with the only 80 protected static NumberFormat getDefaultNumberFormat() [all...] |
/external/icu/android_icu4j/src/main/tests/android/icu/dev/util/ |
ElapsedTimer.java | 16 import android.icu.text.NumberFormat; 30 * More advanced: NumberFormat and/or MessageFormat can be provided in the constructor 48 private NumberFormat myDurationFormat = null; 58 public ElapsedTimer(NumberFormat aNumFmt) { 62 public ElapsedTimer(MessageFormat aMsgFmt, NumberFormat aNumFmt) { 71 public ElapsedTimer(String pattern, NumberFormat aNumFmt) { 89 private static NumberFormat gFormat = null; 91 private static NumberFormat getFormat() { 99 private static String diffTime(NumberFormat fmt, long start, long end) {
|
/external/icu/icu4j/main/tests/framework/src/com/ibm/icu/dev/util/ |
ElapsedTimer.java | 15 import com.ibm.icu.text.NumberFormat; 29 * More advanced: NumberFormat and/or MessageFormat can be provided in the constructor 47 private NumberFormat myDurationFormat = null; 57 public ElapsedTimer(NumberFormat aNumFmt) { 61 public ElapsedTimer(MessageFormat aMsgFmt, NumberFormat aNumFmt) { 70 public ElapsedTimer(String pattern, NumberFormat aNumFmt) { 88 private static NumberFormat gFormat = null; 90 private static NumberFormat getFormat() { 98 private static String diffTime(NumberFormat fmt, long start, long end) {
|
/external/icu/android_icu4j/src/main/java/android/icu/text/ |
NumberFormatServiceShim.java | 24 import android.icu.text.NumberFormat.NumberFormatFactory; 28 class NumberFormatServiceShim extends NumberFormat.NumberFormatShim { 79 NumberFormat createInstance(ULocale desiredLocale, int choice) { 83 // return NumberFormat.createInstance(desiredLocale, choice); 87 NumberFormat fmt = (NumberFormat)service.get(desiredLocale, choice, 90 throw new MissingResourceException("Unable to construct NumberFormat", "", ""); 92 fmt = (NumberFormat)fmt.clone(); 96 if ( choice == NumberFormat.CURRENCYSTYLE || 97 choice == NumberFormat.ISOCURRENCYSTYLE || [all...] |
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/ |
NumberFormatServiceShim.java | 23 import com.ibm.icu.text.NumberFormat.NumberFormatFactory; 27 class NumberFormatServiceShim extends NumberFormat.NumberFormatShim { 78 NumberFormat createInstance(ULocale desiredLocale, int choice) { 82 // return NumberFormat.createInstance(desiredLocale, choice); 86 NumberFormat fmt = (NumberFormat)service.get(desiredLocale, choice, 89 throw new MissingResourceException("Unable to construct NumberFormat", "", ""); 91 fmt = (NumberFormat)fmt.clone(); 95 if ( choice == NumberFormat.CURRENCYSTYLE || 96 choice == NumberFormat.ISOCURRENCYSTYLE || [all...] |
/external/icu/icu4c/source/i18n/unicode/ |
numfmt.h | 63 * NumberFormat helps you to format and parse numbers for any locale. 81 * NumberFormat* nf = NumberFormat::createInstance(success); 87 * NumberFormat. 96 * NumberFormat *nf = NumberFormat::createInstance( success ); 106 * nf = NumberFormat::createInstance(Locale::getFrench(), success); 108 * You can use a \c NumberFormat to parse also. 136 * try dynamic_casting the \c NumberFormat you get from the factory methods to a 169 class U_I18N_API NumberFormat : public Format [all...] |
/external/icu/icu4j/eclipse-build/plugins.template/com.ibm.icu.base/src/com/ibm/icu/text/ |
NumberFormat.java | 26 * {@icuenhanced java.text.NumberFormat}.{@icu _usage_} 28 * <code>NumberFormat</code> is the abstract base class for all number 30 * numbers. <code>NumberFormat</code> also provides methods for determining 33 * <code>NumberFormat</code> helps you to format and parse numbers for any locale. 43 * myString = NumberFormat.getInstance().format(myNumber); 52 * NumberFormat nf = NumberFormat.getInstance(); 62 * NumberFormat nf = NumberFormat.getInstance(Locale.FRENCH); 65 * You can also use a <code>NumberFormat</code> to parse numbers [all...] |