/external/icu/icu4j/main/classes/localespi/src/com/ibm/icu/impl/jdkadapter/ |
DecimalFormatICU.java | 24 import com.ibm.icu.text.NumberFormat; 398 // Methods overriding java.text.NumberFormat 425 if (icuAttribute == NumberFormat.Field.CURRENCY) { 426 jdkAttribute = java.text.NumberFormat.Field.CURRENCY; 427 } else if (icuAttribute == NumberFormat.Field.DECIMAL_SEPARATOR) { 428 jdkAttribute = java.text.NumberFormat.Field.DECIMAL_SEPARATOR; 429 } else if (icuAttribute == NumberFormat.Field.EXPONENT) { 430 jdkAttribute = java.text.NumberFormat.Field.EXPONENT; 431 } else if (icuAttribute == NumberFormat.Field.EXPONENT_SIGN) { 432 jdkAttribute = java.text.NumberFormat.Field.EXPONENT_SIGN [all...] |
/external/icu/android_icu4j/src/main/java/android/icu/text/ |
NumberFormat.java | 37 * <strong>[icu enhancement]</strong> ICU's replacement for {@link java.text.NumberFormat}. Methods, fields, and other functionality specific to ICU are labeled '<strong>[icu]</strong>'. 39 * <code>NumberFormat</code> is the abstract base class for all number 41 * numbers. <code>NumberFormat</code> also provides methods for determining 44 * <code>NumberFormat</code> helps you to format and parse numbers for any locale. 54 * myString = NumberFormat.getInstance().format(myNumber); 63 * NumberFormat nf = NumberFormat.getInstance(); 73 * NumberFormat nf = NumberFormat.getInstance(Locale.FRENCH); 76 * You can also use a <code>NumberFormat</code> to parse numbers [all...] |
CurrencyFormat.java | 40 private NumberFormat fmt; 47 fmt = NumberFormat.getCurrencyInstance(locale.toLocale()); 56 result.fmt = (NumberFormat) fmt.clone(); 107 public NumberFormat getNumberFormat() {
|
/external/icu/icu4c/source/i18n/ |
currfmt.cpp | 26 fmt = NumberFormat::createCurrencyInstance(locale, ec); 32 fmt = (NumberFormat*) other.fmt->clone();
|
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/ |
NumberFormat.java | 36 * {@icuenhanced java.text.NumberFormat}.{@icu _usage_} 38 * <code>NumberFormat</code> is the abstract base class for all number 40 * numbers. <code>NumberFormat</code> also provides methods for determining 43 * <code>NumberFormat</code> helps you to format and parse numbers for any locale. 53 * myString = NumberFormat.getInstance().format(myNumber); 62 * NumberFormat nf = NumberFormat.getInstance(); 72 * NumberFormat nf = NumberFormat.getInstance(Locale.FRENCH); 75 * You can also use a <code>NumberFormat</code> to parse numbers [all...] |
CurrencyFormat.java | 39 private NumberFormat fmt; 46 fmt = NumberFormat.getCurrencyInstance(locale.toLocale()); 55 result.fmt = (NumberFormat) fmt.clone(); 106 public NumberFormat getNumberFormat() {
|
/libcore/benchmarks/src/benchmarks/regression/ |
ExpensiveObjectsBenchmark.java | 23 import java.text.NumberFormat; 96 NumberFormat.getInstance(Locale.US); 101 NumberFormat nf = NumberFormat.getInstance(Locale.US); 108 NumberFormat nf = NumberFormat.getInstance(Locale.US); 121 NumberFormat nf = NumberFormat.getInstance(Locale.US);
|
/libcore/luni/src/test/java/libcore/java/text/ |
AttributedCharacterIteratorAttributeTest.java | 23 import java.text.NumberFormat; 37 assertSameReserialized(NumberFormat.Field.INTEGER);
|
DecimalFormatTest.java | 25 import java.text.NumberFormat; 52 NumberFormat numberFormat = NumberFormat.getNumberInstance(Locale.US); 53 numberFormat.setGroupingUsed(false); 54 numberFormat.setMinimumIntegerDigits(400); 58 assertEquals(309, numberFormat.format(123).length()); 59 assertEquals(309, numberFormat.format(BigInteger.valueOf(123)).length()); 65 NumberFormat pf = NumberFormat.getPercentInstance() [all...] |
/external/icu/icu4c/source/test/intltest/ |
tsnmfmt.h | 24 * NumberFormat. 44 * test NumberFormat::getAvailableLocales 56 NumberFormat* fFormat;
|
nmfmtrt.cpp | 90 // test(NumberFormat.getInstance(new Locale("sr", "", ""))); 94 NumberFormat *fmt = NULL; 98 fmt = NumberFormat::createInstance(status); 99 if (!failure(status, "NumberFormat::createInstance", TRUE)){ 104 fmt = NumberFormat::createCurrencyInstance(status); 105 if (!failure(status, "NumberFormat::createCurrencyInstance", TRUE)){ 110 fmt = NumberFormat::createPercentInstance(status); 111 if (!failure(status, "NumberFormat::createPercentInstance", TRUE)){ 118 const Locale *loc = NumberFormat::getAvailableLocales(locCount); 128 fmt = NumberFormat::createInstance(loc[i], status) [all...] |
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/ |
IntlTestNumberFormat.java | 24 import android.icu.text.NumberFormat; 28 * NumberFormat. 32 public NumberFormat fNumberFormat; 41 fNumberFormat = NumberFormat.getInstance(locale); 45 fNumberFormat = NumberFormat.getCurrencyInstance(locale); 49 fNumberFormat = NumberFormat.getPercentInstance(locale); 54 fNumberFormat = NumberFormat.getScientificInstance(locale); 68 fNumberFormat = NumberFormat.getInstance(locale); 72 fNumberFormat = NumberFormat.getCurrencyInstance(locale); 76 fNumberFormat = NumberFormat.getPercentInstance(locale) [all...] |
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/ |
IntlTestNumberFormat.java | 23 import com.ibm.icu.text.NumberFormat; 27 * NumberFormat. 31 public NumberFormat fNumberFormat; 40 fNumberFormat = NumberFormat.getInstance(locale); 44 fNumberFormat = NumberFormat.getCurrencyInstance(locale); 48 fNumberFormat = NumberFormat.getPercentInstance(locale); 53 fNumberFormat = NumberFormat.getScientificInstance(locale); 67 fNumberFormat = NumberFormat.getInstance(locale); 71 fNumberFormat = NumberFormat.getCurrencyInstance(locale); 75 fNumberFormat = NumberFormat.getPercentInstance(locale) [all...] |
/external/apache-commons-math/src/main/java/org/apache/commons/math/util/ |
CompositeFormat.java | 21 import java.text.NumberFormat; 37 * {@link NumberFormat#getInstance()} with the only customizing that the 41 protected static NumberFormat getDefaultNumberFormat() { 47 * {@link NumberFormat#getInstance(java.util.Locale)} with the only 52 protected static NumberFormat getDefaultNumberFormat(final Locale locale) { 53 final NumberFormat nf = NumberFormat.getInstance(locale); 140 protected Number parseNumber(final String source, final NumberFormat format, 207 protected StringBuffer formatDouble(final double value, final NumberFormat format,
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
Support_MessageFormat.java | 22 import java.text.NumberFormat; 67 NumberFormat.Field.FRACTION, 0, 0); 72 NumberFormat.Field.EXPONENT_SIGN, 0, 0); 110 v.add(new FieldContainer(38, 39, NumberFormat.Field.INTEGER)); 113 v.add(new FieldContainer(61, 62, NumberFormat.Field.INTEGER)); 115 v.add(new FieldContainer(62, 63, NumberFormat.Field.DECIMAL_SEPARATOR)); 117 v.add(new FieldContainer(63, 64, NumberFormat.Field.FRACTION));
|
/libcore/support/src/test/java/tests/support/ |
Support_MessageFormat.java | 22 import java.text.NumberFormat; 64 NumberFormat.Field.FRACTION, 0, 0); 69 NumberFormat.Field.EXPONENT_SIGN, 0, 0); 107 v.add(new FieldContainer(38, 39, NumberFormat.Field.INTEGER)); 110 v.add(new FieldContainer(61, 62, NumberFormat.Field.INTEGER)); 112 v.add(new FieldContainer(62, 63, NumberFormat.Field.DECIMAL_SEPARATOR)); 114 v.add(new FieldContainer(63, 64, NumberFormat.Field.FRACTION));
|
/external/icu/icu4j/eclipse-build/plugins.template/com.ibm.icu.base/src/com/ibm/icu/text/ |
DecimalFormat.java | 30 * <code>DecimalFormat</code> is a concrete subclass of {@link NumberFormat} that formats 38 * <p>To obtain a {@link NumberFormat} for a specific locale (including the default 39 * locale) call one of <code>NumberFormat</code>'s factory methods such as {@link 40 * NumberFormat#getInstance}. Do not call the <code>DecimalFormat</code> constructors 41 * directly, unless you know what you are doing, since the {@link NumberFormat} factory 46 * NumberFormat f = NumberFormat.getInstance(loc); 57 * Locale[] locales = NumberFormat.getAvailableLocales(); 59 * NumberFormat format; 70 * format = NumberFormat.getInstance(locales[i]); break [all...] |
/external/apache-commons-math/src/main/java/org/apache/commons/math/fraction/ |
FractionFormat.java | 21 import java.text.NumberFormat; 55 public FractionFormat(final NumberFormat format) { 65 public FractionFormat(final NumberFormat numeratorFormat, 66 final NumberFormat denominatorFormat) { 72 * is the same set as the {@link NumberFormat} set. 76 return NumberFormat.getAvailableLocales(); 126 * {@link NumberFormat#getNumberInstance(java.util.Locale)} with the only 130 protected static NumberFormat getDefaultNumberFormat() {
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/linear/ |
RealVectorFormat.java | 21 import java.text.NumberFormat; 79 private final NumberFormat format; 94 public RealVectorFormat(final NumberFormat format) { 118 final String separator, final NumberFormat format) { 130 * <p>This is the same set as the {@link NumberFormat} set.</p> 134 return NumberFormat.getAvailableLocales(); 165 public NumberFormat getFormat() {
|
/external/icu/icu4c/source/i18n/unicode/ |
measfmt.h | 79 class NumberFormat; 116 NumberFormat *nfToAdopt, 174 * array. The NumberFormat of this object is used only to format the amount 292 NumberFormat *nfToAdopt, 297 * the NumberFormat object. Returns TRUE if locale changed; FALSE if no 305 * Let subclass change NumberFormat. 308 void adoptNumberFormat(NumberFormat *nfToAdopt, UErrorCode &status); 314 const NumberFormat &getNumberFormat() const; 338 const SharedNumberFormat *numberFormat; 370 const NumberFormat &nf [all...] |
/external/icu/icu4c/source/samples/numfmt/ |
main.cpp | 48 * Sample code for the C++ API to NumberFormat. 55 NumberFormat *fmt = NumberFormat::createInstance(us, status); 56 check(status, "NumberFormat::createInstance"); 63 check(status, "NumberFormat::parse"); 65 printf("NumberFormat::parse(\""); // Display the result 75 check(status, "NumberFormat::format"); 77 printf("NumberFormat::format("); // Display the result 90 * Set a currency on a NumberFormat with pre-ICU 2.6 APIs. 94 * @param nf The NumberFormat on which to set the currency; takes effect o [all...] |
/packages/apps/Settings/src/com/android/settings/utils/ |
FileSizeFormatter.java | 25 import android.icu.text.NumberFormat; 73 private static NumberFormat getNumberFormatter(Locale locale, int fractionDigits) { 74 final NumberFormat numberFormatter = NumberFormat.getInstance(locale); 79 // We do this only for DecimalFormat, since in the general NumberFormat case, calling 86 private static String formatMeasureShort(Locale locale, NumberFormat numberFormatter, 96 final NumberFormat numberFormatter = getNumberFormatter(locale, input.fractionDigits);
|
/external/icu/android_icu4j/src/main/tests/android/icu/dev/util/ |
Timer.java | 13 import android.icu.text.NumberFormat; 82 private DecimalFormat nf = (DecimalFormat) NumberFormat.getNumberInstance(ULocale.ENGLISH); 83 private DecimalFormat pf = (DecimalFormat) NumberFormat.getPercentInstance(ULocale.ENGLISH);
|
/external/icu/icu4j/main/tests/framework/src/com/ibm/icu/dev/util/ |
Timer.java | 12 import com.ibm.icu.text.NumberFormat; 81 private DecimalFormat nf = (DecimalFormat) NumberFormat.getNumberInstance(ULocale.ENGLISH); 82 private DecimalFormat pf = (DecimalFormat) NumberFormat.getPercentInstance(ULocale.ENGLISH);
|
/external/icu/icu4j/samples/src/com/ibm/icu/samples/iuc/ |
PopulationData.java | 15 import com.ibm.icu.text.NumberFormat; 71 NumberFormat nf = NumberFormat.getInstance();
|