Home
last modified time | relevance | path

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

12

/libcore/support/src/test/java/tests/support/
DSupport_DecimalFormat.java21 import java.text.NumberFormat;
42 DecimalFormat format = (DecimalFormat) NumberFormat in t_format_with_FieldPosition()
47 t_FormatWithField(0, format, number, text, NumberFormat.Field.CURRENCY, in t_format_with_FieldPosition()
49 t_FormatWithField(1, format, number, text, NumberFormat.Field.INTEGER, in t_format_with_FieldPosition()
52 NumberFormat.Field.GROUPING_SEPARATOR, 3, 4); in t_format_with_FieldPosition()
54 NumberFormat.Field.DECIMAL_SEPARATOR, 11, 12); in t_format_with_FieldPosition()
55 t_FormatWithField(4, format, number, text, NumberFormat.Field.FRACTION, in t_format_with_FieldPosition()
59 t_FormatWithField(5, format, number, text, NumberFormat.Field.SIGN, 0, in t_format_with_FieldPosition()
61 t_FormatWithField(6, format, number, text, NumberFormat.Field.EXPONENT, in t_format_with_FieldPosition()
64 NumberFormat.Field.EXPONENT_SIGN, 0, 0); in t_format_with_FieldPosition()
[all …]
DSupport_MessageFormat.java22 import java.text.NumberFormat;
64 NumberFormat.Field.FRACTION, 0, 0); in t_format_with_FieldPosition()
69 NumberFormat.Field.EXPONENT_SIGN, 0, 0); in t_format_with_FieldPosition()
107 v.add(new FieldContainer(38, 39, NumberFormat.Field.INTEGER)); in getMessageVector1()
110 v.add(new FieldContainer(61, 62, NumberFormat.Field.INTEGER)); in getMessageVector1()
112 v.add(new FieldContainer(62, 63, NumberFormat.Field.DECIMAL_SEPARATOR)); in getMessageVector1()
114 v.add(new FieldContainer(63, 64, NumberFormat.Field.FRACTION)); in getMessageVector1()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DSupport_DecimalFormat.java21 import java.text.NumberFormat;
41 DecimalFormat format = (DecimalFormat) NumberFormat.getCurrencyInstance(Locale.US); in t_format_with_FieldPosition()
45 t_FormatWithField(0, format, number, text, NumberFormat.Field.CURRENCY, 0, 1); in t_format_with_FieldPosition()
46 t_FormatWithField(1, format, number, text, NumberFormat.Field.INTEGER, 1, 11); in t_format_with_FieldPosition()
47 t_FormatWithField(2, format, number, text, NumberFormat.Field.GROUPING_SEPARATOR, 3, 4); in t_format_with_FieldPosition()
48 t_FormatWithField(3, format, number, text, NumberFormat.Field.DECIMAL_SEPARATOR, 11, 12); in t_format_with_FieldPosition()
49 t_FormatWithField(4, format, number, text, NumberFormat.Field.FRACTION, 12, 14); in t_format_with_FieldPosition()
52 t_FormatWithField(5, format, number, text, NumberFormat.Field.SIGN, 0, 0); in t_format_with_FieldPosition()
53 t_FormatWithField(6, format, number, text, NumberFormat.Field.EXPONENT, 0, 0); in t_format_with_FieldPosition()
54 t_FormatWithField(7, format, number, text, NumberFormat.Field.EXPONENT_SIGN, 0, 0); in t_format_with_FieldPosition()
[all …]
DNumberFormatTest.java23 import java.text.NumberFormat;
38 DecimalFormat format = (DecimalFormat) NumberFormat in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition()
125 DecimalFormat format = (DecimalFormat) NumberFormat in test_getIntegerInstance()
153 DecimalFormat format = (DecimalFormat) NumberFormat in test_getIntegerInstanceLjava_util_Locale()
174 format = (DecimalFormat) NumberFormat.getIntegerInstance(arLocale); in test_getIntegerInstanceLjava_util_Locale()
207 NumberFormat format = NumberFormat.getInstance(new Locale("hu", "HU")); in test_getCurrency()
214 ((NumberFormat) cformat).getCurrency(); in test_getCurrency()
224 NumberFormat format = NumberFormat.getInstance(); in test_getMaximumIntegerDigits()
236 NumberFormat format = NumberFormat.getInstance(new Locale("hu", "HU")); in test_setCurrencyLjava_util_Currency()
244 ((NumberFormat) cformat).setCurrency(currA); in test_setCurrencyLjava_util_Currency()
[all …]
DSupport_MessageFormat.java22 import java.text.NumberFormat;
67 NumberFormat.Field.FRACTION, 0, 0); in t_format_with_FieldPosition()
72 NumberFormat.Field.EXPONENT_SIGN, 0, 0); in t_format_with_FieldPosition()
110 v.add(new FieldContainer(38, 39, NumberFormat.Field.INTEGER)); in getMessageVector1()
113 v.add(new FieldContainer(61, 62, NumberFormat.Field.INTEGER)); in getMessageVector1()
115 v.add(new FieldContainer(62, 63, NumberFormat.Field.DECIMAL_SEPARATOR)); in getMessageVector1()
117 v.add(new FieldContainer(63, 64, NumberFormat.Field.FRACTION)); in getMessageVector1()
DMessageFormatTest.java32 import java.text.NumberFormat;
118 f1.setFormat(2, NumberFormat.getInstance()); in test_setFormatILjava_text_Format()
129 NumberFormat.getInstance(), in test_setFormatILjava_text_Format()
234 NumberFormat.getCurrencyInstance(), in test_setFormats$Ljava_text_Format()
313 assertEquals(format.getFormats()[1], NumberFormat.getCurrencyInstance(mk)); in test_ConstructorLjava_lang_StringLjava_util_Locale()
314 assertEquals(format.getFormats()[2], NumberFormat.getIntegerInstance(mk)); in test_ConstructorLjava_lang_StringLjava_util_Locale()
329 assertTrue("Wrong number format", formats[2].equals(NumberFormat in test_ConstructorLjava_lang_String()
347 buffer.append(NumberFormat.getInstance().format(new Double(7.2))); in test_ConstructorLjava_lang_String()
469 .equals(NumberFormat.getNumberInstance())); in test_applyPatternLjava_lang_String()
474 .equals(NumberFormat.getCurrencyInstance())); in test_applyPatternLjava_lang_String()
[all …]
DDecimalFormatTest.java28 import java.text.NumberFormat;
95 DecimalFormat form = (DecimalFormat) NumberFormat.getInstance(Locale.US); in test_parse_returnType()
102 form = (DecimalFormat) NumberFormat.getInstance(Locale.US); in test_parse_returnType()
116 form = (DecimalFormat) NumberFormat.getInstance(Locale.US); in test_parse_returnType()
142 form = (DecimalFormat) NumberFormat.getInstance(Locale.US); in test_parse_returnType()
151 form = (DecimalFormat) NumberFormat.getInstance(Locale.US); in test_parse_returnType()
159 form = (DecimalFormat) NumberFormat.getInstance(Locale.US); in test_parse_returnType()
177 form = (DecimalFormat) NumberFormat.getInstance(Locale.US); in test_parse_returnType()
189 form = (DecimalFormat) NumberFormat.getInstance(Locale.US); in test_parse_returnType()
201 form = (DecimalFormat) NumberFormat.getInstance(Locale.US); in test_parse_returnType()
[all …]
/libcore/luni/src/test/java/libcore/java/text/
DOldNumberFormatTest.java22 import java.text.NumberFormat;
32 DecimalFormat format = (DecimalFormat) NumberFormat.getIntegerInstance(Locale.US); in test_getIntegerInstanceLjava_util_Locale()
42 format = (DecimalFormat) NumberFormat.getIntegerInstance(chLocale); in test_getIntegerInstanceLjava_util_Locale()
51 format = (DecimalFormat) NumberFormat.getIntegerInstance(arLocale); in test_getIntegerInstanceLjava_util_Locale()
66 NumberFormat format = NumberFormat.getInstance(); in test_setMaximumIntegerDigits()
81 NumberFormat format = NumberFormat.getInstance(new Locale("hu", "HU")); in test_setCurrencyLjava_util_Currency()
89 ((NumberFormat) cformat).setCurrency(currA); in test_setCurrencyLjava_util_Currency()
95 NumberFormat.getInstance().setCurrency(null); in test_setCurrencyLjava_util_Currency()
102 NumberFormat.getIntegerInstance().setCurrency(null); in test_setCurrencyLjava_util_Currency()
111 assertNull(NumberFormat.getInstance().parseObject("0", in test_parseObjectLjava_lang_StringLjava_text_ParsePosition()
[all …]
DNumberFormatTest.java24 import java.text.NumberFormat;
42 NumberFormat nf = NumberFormat.getNumberInstance(Locale.US); in test_custom_Number_gets_longValue()
49 class MyNumberFormat extends NumberFormat { in test_small_BigInteger_gets_longValue()
62 NumberFormat nf = new MyNumberFormat(); in test_small_BigInteger_gets_longValue()
72 NumberFormat numberFormat = NumberFormat.getNumberInstance(new Locale("ar")); in test_getIntegerInstance_ar()
75 NumberFormat integerFormat = NumberFormat.getIntegerInstance(new Locale("ar")); in test_getIntegerInstance_ar()
82 NumberFormat nf = NumberFormat.getNumberInstance(arabic); in test_numberLocalization()
91 NumberFormat nf = NumberFormat.getPercentInstance(Locale.US); in test_10333()
102 NumberFormat nf = NumberFormat.getPercentInstance(Locale.US); in testPercentageRounding()
118 NumberFormat nf = NumberFormat.getNumberInstance(Locale.US); in test_62269()
[all …]
DOldNumberFormatFieldTest.java25 import java.text.NumberFormat;
50 NumberFormat.Field nfield = NumberFormat.Field.CURRENCY; in test_readResolve()
58 NumberFormat.Field nfield2 = (NumberFormat.Field) in.readObject(); in test_readResolve()
71 static class MyNumberFormat extends NumberFormat.Field {
DDecimalFormatTest.java26 import java.text.NumberFormat;
53 NumberFormat numberFormat = NumberFormat.getNumberInstance(Locale.US); in test_setMaximumIntegerDigits()
66 NumberFormat pf = NumberFormat.getPercentInstance(); in testBigDecimalBug1897917()
124 DecimalFormat df = (DecimalFormat) NumberFormat.getInstance(); in testBigDecimalICUConsistency()
158 NumberFormat pf = NumberFormat.getPercentInstance(); in assertBigDecimalWithFraction()
164 DecimalFormat df = (DecimalFormat)NumberFormat.getInstance(); in assertDecFmtWithMultiplierAndFraction()
172 DecimalFormat df = (DecimalFormat)NumberFormat.getIntegerInstance(locale); in assertDecFmtWithMultiplierAndFractionByLocale()
198 DecimalFormat df = (DecimalFormat) NumberFormat.getCurrencyInstance(Locale.US); in testBug9087737()
206 DecimalFormat df = (DecimalFormat) NumberFormat.getCurrencyInstance(Locale.US); in testBug15081434()
287 NumberFormat numberFormat = NumberFormat.getCurrencyInstance(Locale.GERMAN); in testBug71369()
[all …]
DAttributedCharacterIteratorAttributeTest.java23 import java.text.NumberFormat;
37 assertSameReserialized(NumberFormat.Field.INTEGER); in testSerialization()
DOldDecimalFormatTestICU.java20 import java.text.NumberFormat;
35 format = (DecimalFormat) NumberFormat.getNumberInstance(); in setUp()
40 DecimalFormat format = (DecimalFormat) NumberFormat in test_sigDigitPatterns()
/libcore/ojluni/annotations/hiddenapi/java/text/
DNumberFormat.java45 public abstract class NumberFormat extends java.text.Format { class
47 protected NumberFormat() { in NumberFormat() method in NumberFormat
92 public static final java.text.NumberFormat getInstance() { in getInstance()
96 public static java.text.NumberFormat getInstance(java.util.Locale inLocale) { in getInstance()
100 public static final java.text.NumberFormat getNumberInstance() { in getNumberInstance()
104 public static java.text.NumberFormat getNumberInstance(java.util.Locale inLocale) { in getNumberInstance()
108 public static final java.text.NumberFormat getIntegerInstance() { in getIntegerInstance()
112 public static java.text.NumberFormat getIntegerInstance(java.util.Locale inLocale) { in getIntegerInstance()
116 public static final java.text.NumberFormat getCurrencyInstance() { in getCurrencyInstance()
120 public static java.text.NumberFormat getCurrencyInstance(java.util.Locale inLocale) { in getCurrencyInstance()
[all …]
DDateFormat.java134 public void setNumberFormat(java.text.NumberFormat newNumberFormat) { in setNumberFormat()
138 public java.text.NumberFormat getNumberFormat() { in getNumberFormat()
226 protected java.text.NumberFormat numberFormat;
/libcore/ojluni/annotations/sdk/nullability/java/text/
DNumberFormat.annotated.java50 public abstract class NumberFormat extends java.text.Format { class
52 protected NumberFormat() { throw new RuntimeException("Stub!"); } in NumberFormat() method in NumberFormat
74 @libcore.util.NonNull public static final java.text.NumberFormat getInstance() { throw new RuntimeE… in getInstance()
76 @libcore.util.NonNull public static java.text.NumberFormat getInstance(@libcore.util.NonNull java.u… in getInstance()
78 @libcore.util.NonNull public static final java.text.NumberFormat getNumberInstance() { throw new Ru… in getNumberInstance()
80 @libcore.util.NonNull public static java.text.NumberFormat getNumberInstance(@libcore.util.NonNull … in getNumberInstance()
82 @libcore.util.NonNull public static final java.text.NumberFormat getIntegerInstance() { throw new R… in getIntegerInstance()
84 @libcore.util.NonNull public static java.text.NumberFormat getIntegerInstance(@libcore.util.NonNull… in getIntegerInstance()
86 @libcore.util.NonNull public static final java.text.NumberFormat getCurrencyInstance() { throw new … in getCurrencyInstance()
88 @libcore.util.NonNull public static java.text.NumberFormat getCurrencyInstance(@libcore.util.NonNul… in getCurrencyInstance()
[all …]
/libcore/ojluni/src/main/java/java/text/
DNumberFormat.java180 public abstract class NumberFormat extends Format { class
200 protected NumberFormat() { in NumberFormat() method in NumberFormat
418 public final static NumberFormat getInstance() { in getInstance()
431 public static NumberFormat getInstance(Locale inLocale) { in getInstance()
447 public final static NumberFormat getNumberInstance() { in getNumberInstance()
458 public static NumberFormat getNumberInstance(Locale inLocale) { in getNumberInstance()
480 public final static NumberFormat getIntegerInstance() { in getIntegerInstance()
497 public static NumberFormat getIntegerInstance(Locale inLocale) { in getIntegerInstance()
512 public final static NumberFormat getCurrencyInstance() { in getCurrencyInstance()
522 public static NumberFormat getCurrencyInstance(Locale inLocale) { in getCurrencyInstance()
[all …]
DDecimalFormat.java380 public class DecimalFormat extends NumberFormat {
523 android.icu.text.NumberFormat.Field attribute; in getIcuFieldPosition()
525 attribute = android.icu.text.NumberFormat.Field.INTEGER; in getIcuFieldPosition()
527 attribute = android.icu.text.NumberFormat.Field.FRACTION; in getIcuFieldPosition()
529 attribute = android.icu.text.NumberFormat.Field.DECIMAL_SEPARATOR; in getIcuFieldPosition()
531 attribute = android.icu.text.NumberFormat.Field.EXPONENT_SYMBOL; in getIcuFieldPosition()
533 attribute = android.icu.text.NumberFormat.Field.EXPONENT_SIGN; in getIcuFieldPosition()
535 attribute = android.icu.text.NumberFormat.Field.EXPONENT; in getIcuFieldPosition()
537 attribute = android.icu.text.NumberFormat.Field.GROUPING_SEPARATOR; in getIcuFieldPosition()
539 attribute = android.icu.text.NumberFormat.Field.CURRENCY; in getIcuFieldPosition()
[all …]
DMessageFormat.java533 } else if (fmt instanceof NumberFormat) { in toPattern()
534 if (fmt.equals(NumberFormat.getInstance(locale))) { in toPattern()
536 } else if (fmt.equals(NumberFormat.getCurrencyInstance(locale))) { in toPattern()
538 } else if (fmt.equals(NumberFormat.getPercentInstance(locale))) { in toPattern()
540 } else if (fmt.equals(NumberFormat.getIntegerInstance(locale))) { in toPattern()
1278 subFormatter = NumberFormat.getInstance(locale); in subformat()
1475 newFormat = NumberFormat.getInstance(locale); in makeFormat()
1478 newFormat = NumberFormat.getCurrencyInstance(locale); in makeFormat()
1481 newFormat = NumberFormat.getPercentInstance(locale); in makeFormat()
1484 newFormat = NumberFormat.getIntegerInstance(locale); in makeFormat()
DDateFormat.java168 protected NumberFormat numberFormat;
658 public void setNumberFormat(NumberFormat newNumberFormat) in setNumberFormat()
668 public NumberFormat getNumberFormat() in getNumberFormat()
775 other.numberFormat = (NumberFormat) numberFormat.clone(); in clone()
/libcore/benchmarks/src/benchmarks/regression/
DExpensiveObjectsBenchmark.java23 import java.text.NumberFormat;
96 NumberFormat.getInstance(Locale.US); in timeNewNumberFormat()
101 NumberFormat nf = NumberFormat.getInstance(Locale.US); in timeClonedNumberFormat()
108 NumberFormat nf = NumberFormat.getInstance(Locale.US); in timeNumberFormatTrivialFormatLong()
121 NumberFormat nf = NumberFormat.getInstance(Locale.US); in timeNumberFormatTrivialFormatDouble()
DNumberFormatBenchmark.java19 import java.text.NumberFormat;
28 NumberFormat.getInstance(locale); in time_instantiation()
DDecimalFormatBenchmark.java5 import java.text.NumberFormat;
17 NumberFormat.getCurrencyInstance(Locale.US);
19 NumberFormat.getInstance(Locale.FRANCE);
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DSerializationStressTest4.java31 import java.text.NumberFormat;
709 objToSave = new java.text.NumberFormat() { in test_writeObject_NumberFormat()
729 if (!(obj instanceof java.text.NumberFormat)) in test_writeObject_NumberFormat()
731 return save == ((Long) ((java.text.NumberFormat) obj) in test_writeObject_NumberFormat()
736 ((java.text.NumberFormat) objToSave).format(63L, null, null); in test_writeObject_NumberFormat()
1746 NumberFormat.Field[] objToSave = null; in test_writeObject_NumberFormat_Field()
1747 NumberFormat.Field[] objLoaded = null; in test_writeObject_NumberFormat_Field()
1750 objToSave = new NumberFormat.Field[] { NumberFormat.Field.CURRENCY, in test_writeObject_NumberFormat_Field()
1751 NumberFormat.Field.DECIMAL_SEPARATOR, in test_writeObject_NumberFormat_Field()
1752 NumberFormat.Field.EXPONENT, in test_writeObject_NumberFormat_Field()
[all …]
/libcore/ojluni/annotations/mmodule/java/text/
DDateFormat.annotated.java95 public void setNumberFormat(java.text.NumberFormat newNumberFormat) { throw new RuntimeException("S… in setNumberFormat()
97 public java.text.NumberFormat getNumberFormat() { throw new RuntimeException("Stub!"); } in getNumberFormat()
163 protected java.text.NumberFormat numberFormat;

12