/external/icu4c/test/intltest/ |
nmfmtrt.h | 41 void test(NumberFormat *fmt, const Formattable& value); 44 static double proportionalError(const Formattable& a, const Formattable& b); 45 static UnicodeString& typeOf(const Formattable& n, UnicodeString& result); 49 isDouble(const Formattable& n) 50 { return (n.getType() == Formattable::kDouble); } 53 isLong(const Formattable& n) 54 { return (n.getType() == Formattable::kLong); }
|
tfsmalls.cpp | 167 Formattable* ftp = new Formattable(); 168 if (!ftp || !(ftp->getType() == Formattable::kLong) || !(ftp->getLong() == 0)) { 169 it_errln("*** Formattable constructor or getType or getLong"); 173 Formattable fta, ftb; 185 it_errln("*** Formattable setLong or operator== or !="); 195 if ((fta.getType() == Formattable::kDouble) && (fta.getDouble() == 3.0)) { 206 if ((fta.getType() == Formattable::kDate) && (fta.getDate() == 4.0)) { 226 const Formattable ftc(fta); 231 t = (fta.getType() == Formattable::kString) [all...] |
numfmtst.h | 167 static UBool equalValue(const Formattable& a, const Formattable& b); 175 void expect2(NumberFormat& fmt, const Formattable& n, const UnicodeString& str); 177 void expect3(NumberFormat& fmt, const Formattable& n, const UnicodeString& str); 179 void expect2(NumberFormat& fmt, const Formattable& n, const char* str) { 183 void expect2(NumberFormat* fmt, const Formattable& n, const UnicodeString& str, UErrorCode ec); 185 void expect2(NumberFormat* fmt, const Formattable& n, const char* str, UErrorCode ec) { 189 void expect(NumberFormat& fmt, const UnicodeString& str, const Formattable& n); 191 void expect(NumberFormat& fmt, const char *str, const Formattable& n) { 195 void expect(NumberFormat& fmt, const Formattable& n [all...] |
tfsmalls.h | 22 * Formattable in test_Formattable().
|
tmsgfmt.cpp | 140 Formattable result; 199 std::ostream& operator<<(std::ostream& stream, const Formattable& obj); 207 const Formattable& obj) 213 case Formattable::kDate : 220 case Formattable::kDouble : 225 case Formattable::kLong : 228 case Formattable::kString: 231 case Formattable::kArray: 233 const Formattable* array; 249 Formattable testArgs[] = [all...] |
msfmrgts.cpp | 97 Formattable params [] = { 98 Formattable(UnicodeString("BUG")), 99 Formattable(0, Formattable::kIsDate) 113 // do we want to verify that the Formattable* array is not NULL, 192 Formattable params []= { 193 Formattable((int32_t)7) 203 Formattable *objs = messageFormatter->parse(tempBuffer, pp, count); 213 Formattable obj = objs[i]; 215 if(obj.getType() == Formattable::kString [all...] |
tufmtts.cpp | 69 Formattable formattable; local 70 formattable.adoptObject(source); 71 formatted = ((Format*)formats[style])->format(formattable, formatted, status); 78 Formattable result; 81 if (result != formattable) { 85 Formattable result_1; 88 if (result_1 != formattable) { 127 Formattable formattable((int32_t)2) [all...] |
nmfmtrt.cpp | 220 test(fmt, Formattable(value)); 226 test(fmt, Formattable(value)); 230 NumberFormatRoundTripTest::test(NumberFormat *fmt, const Formattable& value) 244 Formattable n; 292 escape(s) + " P> " + (n.getType() == Formattable::kDouble ? n.getDouble() : (double)n.getLong()) 299 NumberFormatRoundTripTest::proportionalError(const Formattable& a, const Formattable& b) 321 NumberFormatRoundTripTest::typeOf(const Formattable& n, UnicodeString& result) 323 if(n.getType() == Formattable::kLong) { 326 else if(n.getType() == Formattable::kDouble) [all...] |
tsnmfmt.cpp | 20 static const char * formattableTypeName(Formattable::Type t) 23 case Formattable::kDate: return "kDate"; 24 case Formattable::kDouble: return "kDouble"; 25 case Formattable::kLong: return "kLong"; 26 case Formattable::kString: return "kString"; 27 case Formattable::kArray: return "kArray"; 28 case Formattable::kInt64: return "kInt64"; 285 Formattable number[DEPTH]; 309 if (number[i].getType() == Formattable::kLong) 311 else if (number[i].getType() == Formattable::kInt64 [all...] |
/external/icu4c/i18n/ |
fmtable_cnv.cpp | 23 // class Formattable 29 // Creates a formattable object with a char* string. 33 Formattable::Formattable(const char* stringToCopy)
|
fmtable.cpp | 32 // class Formattable 37 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(Formattable) 69 * Creates a new Formattable array and copies the values from the specified 73 * @return the new Formattable array. 75 static Formattable* createArrayCopy(const Formattable* array, int32_t count) { 76 Formattable *result = new Formattable[count]; 99 void Formattable::init() { 109 // Creates a formattable object with a long value 0 [all...] |
curramt.cpp | 20 CurrencyAmount::CurrencyAmount(const Formattable& amount, const UChar* isoCode, 27 Measure(Formattable(amount), new CurrencyUnit(isoCode, ec), ec) {
|
umsg.cpp | 43 static const Formattable::Type* getArgTypeList(const MessageFormat& m, 49 const Formattable::Type* 142 // 3. Iterate through each formattable returned, and assign to the arguments 406 const Formattable::Type* argTypes = 410 Formattable* args = new Formattable[count ? count : 1]; 421 case Formattable::kDate: 426 case Formattable::kDouble: 431 case Formattable::kLong: 436 case Formattable::kInt64 [all...] |
currfmt.cpp | 54 UnicodeString& CurrencyFormat::format(const Formattable& obj, 63 Formattable& result,
|
currfmt.h | 71 virtual UnicodeString& format(const Formattable& obj, 80 Formattable& result,
|
tmutamt.cpp | 17 TimeUnitAmount::TimeUnitAmount(const Formattable& number, 27 : Measure(Formattable(amount),
|
/external/icu4c/samples/numfmt/ |
util.h | 19 // Create a display string for a formattable 20 UnicodeString formattableToString(const Formattable& f);
|
util.cpp | 79 // Create a display string for a formattable 80 UnicodeString formattableToString(const Formattable& f) { 82 case Formattable::kDate: 85 case Formattable::kDouble: 91 case Formattable::kLong: 92 case Formattable::kInt64: 98 case Formattable::kString: 100 case Formattable::kArray: 103 const Formattable* array = f.getArray(count);
|
/external/icu4c/i18n/unicode/ |
fmtable.h | 24 * \brief C++ API: Formattable is a thin wrapper for primitive numeric types. 45 * Formattable objects can be passed to the Format class or 46 * its subclasses for formatting. Formattable is a thin wrapper 50 * <p>Internally, a Formattable object is a union of primitive types. 54 * <p>As of ICU 3.0, Formattable may also wrap a UObject pointer, 56 * encapsulated in a Formattable. For legacy reasons and for 58 * within a Formattable. 60 * <p>The Formattable class is not suitable for subclassing. 62 class U_I18N_API Formattable : public UObject { 66 * the Formattable(UDate) constructor and the Formattable(double [all...] |
tmutfmt.h | 63 * Formattable formattable; 65 * formattable.adoptObject(source); 66 * formatted = ((Format*)format)->format(formattable, formatted, status); 67 * Formattable result; 70 * assert (result == formattable); 169 * If the formattable object is not a time unit amount object, 172 * @see Format#format(const Formattable&, UnicodeString&, FieldPosition&, UErrorCode&) const 175 virtual UnicodeString& format(const Formattable& obj, 182 * @see Format#parseObject(const UnicodeString&, Formattable&, ParsePosition&) const [all...] |
format.h | 139 UnicodeString& format(const Formattable& obj, 146 * of Formattable objects. If a subclass of Format receives a Formattable 147 * object type it doesn't handle (e.g., if a numeric Formattable is passed 159 virtual UnicodeString& format(const Formattable& obj, 165 * method. This method allows polymorphic formatting of Formattable objects. 166 * If a subclass of Format receives a Formattable object type it doesn't 167 * handle (e.g., if a numeric Formattable is passed to a DateFormat object) 179 virtual UnicodeString& format(const Formattable& obj, 187 * polymorphic parsing of strings into Formattable objects [all...] |
measure.h | 57 Measure(const Formattable& number, MeasureUnit* adoptedUnit, 95 * Formattable. 98 inline const Formattable& getNumber() const; 117 Formattable number; 126 inline const Formattable& Measure::getNumber() const {
|
msgfmt.h | 247 * Formattable arguments[] = { 249 * Formattable( (Date) cal.getTime(success), Formattable::kIsDate), 272 * Formattable testArgs[] = {3L, "MyDisk"}; 301 * Formattable testArgs[] = {0L, "MyDisk"}; 556 * which can be used with getFormat() and setFormat() to export formattable 629 * Does not take ownership of the Formattable* array or its contents. 644 UnicodeString& format(const Formattable* source, 668 const Formattable* arguments, 675 * string. The array must be stored within a single Formattable [all...] |
/libcore/luni/src/main/java/java/util/ |
FormattableFlags.java | 20 * {@link Formattable#formatTo(Formatter, int, int, int)} and change the output 21 * format in {@code Formattable}s. The validation and interpretation of the 24 * @see Formattable 53 * of the alternate form is determined by the {@code Formattable}.
|
/libcore/luni/src/test/java/libcore/java/util/ |
OldFormattableTest.java | 21 import java.util.Formattable; 26 class Mock_Formattable implements Formattable {
|