/external/icu/icu4c/source/i18n/ |
D | measunit.cpp | 26 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(MeasureUnit) 524 MeasureUnit *MeasureUnit::createGForce(UErrorCode &status) { in createGForce() 525 return MeasureUnit::create(0, 0, status); in createGForce() 528 MeasureUnit *MeasureUnit::createMeterPerSecondSquared(UErrorCode &status) { in createMeterPerSecondSquared() 529 return MeasureUnit::create(0, 1, status); in createMeterPerSecondSquared() 532 MeasureUnit *MeasureUnit::createArcMinute(UErrorCode &status) { in createArcMinute() 533 return MeasureUnit::create(1, 0, status); in createArcMinute() 536 MeasureUnit *MeasureUnit::createArcSecond(UErrorCode &status) { in createArcSecond() 537 return MeasureUnit::create(1, 1, status); in createArcSecond() 540 MeasureUnit *MeasureUnit::createDegree(UErrorCode &status) { in createDegree() [all …]
|
D | currunit.cpp | 37 CurrencyUnit::CurrencyUnit(const CurrencyUnit& other) : MeasureUnit(other) { in CurrencyUnit() 41 CurrencyUnit::CurrencyUnit(const MeasureUnit& other, UErrorCode& ec) : MeasureUnit(other) { in CurrencyUnit() 54 CurrencyUnit::CurrencyUnit() : MeasureUnit() { in CurrencyUnit() 65 MeasureUnit::operator=(other); in operator =()
|
D | measfmt.cpp | 161 U_ASSERT(MEAS_UNIT_COUNT == MeasureUnit::getIndexCount()); in MeasureFormatCacheData() 187 static UBool isCurrency(const MeasureUnit &unit) { in isCurrency() 292 unitIndex = MeasureUnit::internalGetIndexForTypeAndSubtype(type, key); in consumeSubtypeTable() 550 static UBool isTimeUnit(const MeasureUnit &mu, const char *tu) { in isTimeUnit() 760 const MeasureUnit &perUnit, in formatMeasurePerUnit() 767 MeasureUnit *resolvedUnit = in formatMeasurePerUnit() 768 MeasureUnit::resolveUnitPerUnit(measure.getUnit(), perUnit); in formatMeasurePerUnit() 840 UnicodeString MeasureFormat::getUnitDisplayName(const MeasureUnit& unit, UErrorCode& /*status*/) co… in getUnitDisplayName() 954 const MeasureUnit& amtUnit = measure.getUnit(); in formatMeasure() 1101 const MeasureUnit &unit, UMeasureFormatWidth width, int32_t index) const { in getFormatterOrNull() [all …]
|
/external/icu/android_icu4j/src/main/java/android/icu/util/ |
D | MeasureUnit.java | 39 public class MeasureUnit implements Serializable { class 45 private static final Map<String, Map<String,MeasureUnit>> cache 46 = new HashMap<String, Map<String,MeasureUnit>>(); 71 protected MeasureUnit(String type, String subType) { in MeasureUnit() method in MeasureUnit 109 if (!(rhs instanceof MeasureUnit)) { in equals() 112 MeasureUnit c = (MeasureUnit) rhs; in equals() 137 public synchronized static Set<MeasureUnit> getAvailable(String type) { in getAvailable() 139 Map<String, MeasureUnit> units = cache.get(type); in getAvailable() 142 return units == null ? Collections.<MeasureUnit>emptySet() in getAvailable() 143 : Collections.unmodifiableSet(new HashSet<MeasureUnit>(units.values())); in getAvailable() [all …]
|
D | NoUnit.java | 14 public class NoUnit extends MeasureUnit { 23 (NoUnit) MeasureUnit.internalGetInstance("none", "base"); 31 (NoUnit) MeasureUnit.internalGetInstance("none", "percent"); 39 (NoUnit) MeasureUnit.internalGetInstance("none", "permille");
|
D | Measure.java | 36 private final MeasureUnit unit; 43 public Measure(Number number, MeasureUnit unit) { in Measure() 115 public MeasureUnit getUnit() { in getUnit()
|
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/util/ |
D | MeasureUnit.java | 39 public class MeasureUnit implements Serializable { class 45 private static final Map<String, Map<String,MeasureUnit>> cache 46 = new HashMap<String, Map<String,MeasureUnit>>(); 68 protected MeasureUnit(String type, String subType) { in MeasureUnit() method in MeasureUnit 114 if (!(rhs instanceof MeasureUnit)) { in equals() 117 MeasureUnit c = (MeasureUnit) rhs; in equals() 147 public synchronized static Set<MeasureUnit> getAvailable(String type) { in getAvailable() 149 Map<String, MeasureUnit> units = cache.get(type); in getAvailable() 152 return units == null ? Collections.<MeasureUnit>emptySet() in getAvailable() 153 : Collections.unmodifiableSet(new HashSet<MeasureUnit>(units.values())); in getAvailable() [all …]
|
D | NoUnit.java | 13 public class NoUnit extends MeasureUnit { 23 (NoUnit) MeasureUnit.internalGetInstance("none", "base"); 32 (NoUnit) MeasureUnit.internalGetInstance("none", "percent"); 41 (NoUnit) MeasureUnit.internalGetInstance("none", "permille");
|
D | Measure.java | 36 private final MeasureUnit unit; 44 public Measure(Number number, MeasureUnit unit) { in Measure() 121 public MeasureUnit getUnit() { in getUnit()
|
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/ |
D | MeasureUnitTest.java | 47 import android.icu.util.MeasureUnit; 267 MeasureUnit[] units = { in TestCompatible53() 268 MeasureUnit.G_FORCE, in TestCompatible53() 269 MeasureUnit.DEGREE, in TestCompatible53() 270 MeasureUnit.ARC_MINUTE, in TestCompatible53() 271 MeasureUnit.ARC_SECOND, in TestCompatible53() 272 MeasureUnit.ACRE, in TestCompatible53() 273 MeasureUnit.HECTARE, in TestCompatible53() 274 MeasureUnit.SQUARE_FOOT, in TestCompatible53() 275 MeasureUnit.SQUARE_KILOMETER, in TestCompatible53() [all …]
|
D | PluralRangesTest.java | 27 import android.icu.util.MeasureUnit; 81 … {0.0, 1.0, ULocale.FRANCE, FormatWidth.WIDE, MeasureUnit.FAHRENHEIT, "0–1 degré Fahrenheit"}, in TestFormatting() 82 … {1.0, 2.0, ULocale.FRANCE, FormatWidth.WIDE, MeasureUnit.FAHRENHEIT, "1–2 degrés Fahrenheit"}, in TestFormatting() 83 … {3.1, 4.25, ULocale.FRANCE, FormatWidth.SHORT, MeasureUnit.FAHRENHEIT, "3,1–4,25 °F"}, in TestFormatting() 84 … {3.1, 4.25, ULocale.ENGLISH, FormatWidth.SHORT, MeasureUnit.FAHRENHEIT, "3.1–4.25°F"}, in TestFormatting() 85 {3.1, 4.25, ULocale.CHINESE, FormatWidth.WIDE, MeasureUnit.INCH, "3.1-4.25英寸"}, in TestFormatting() 86 {0.0, 1.0, ULocale.ENGLISH, FormatWidth.WIDE, MeasureUnit.INCH, "0–1 inches"}, in TestFormatting() 108 final MeasureUnit unit = (MeasureUnit) test[4]; in TestFormatting()
|
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/ |
D | MeasureUnitTest.java | 46 import com.ibm.icu.util.MeasureUnit; 264 MeasureUnit[] units = { in TestCompatible53() 265 MeasureUnit.G_FORCE, in TestCompatible53() 266 MeasureUnit.DEGREE, in TestCompatible53() 267 MeasureUnit.ARC_MINUTE, in TestCompatible53() 268 MeasureUnit.ARC_SECOND, in TestCompatible53() 269 MeasureUnit.ACRE, in TestCompatible53() 270 MeasureUnit.HECTARE, in TestCompatible53() 271 MeasureUnit.SQUARE_FOOT, in TestCompatible53() 272 MeasureUnit.SQUARE_KILOMETER, in TestCompatible53() [all …]
|
D | PluralRangesTest.java | 26 import com.ibm.icu.util.MeasureUnit; 78 … {0.0, 1.0, ULocale.FRANCE, FormatWidth.WIDE, MeasureUnit.FAHRENHEIT, "0–1 degré Fahrenheit"}, in TestFormatting() 79 … {1.0, 2.0, ULocale.FRANCE, FormatWidth.WIDE, MeasureUnit.FAHRENHEIT, "1–2 degrés Fahrenheit"}, in TestFormatting() 80 … {3.1, 4.25, ULocale.FRANCE, FormatWidth.SHORT, MeasureUnit.FAHRENHEIT, "3,1–4,25 °F"}, in TestFormatting() 81 … {3.1, 4.25, ULocale.ENGLISH, FormatWidth.SHORT, MeasureUnit.FAHRENHEIT, "3.1–4.25°F"}, in TestFormatting() 82 {3.1, 4.25, ULocale.CHINESE, FormatWidth.WIDE, MeasureUnit.INCH, "3.1-4.25英寸"}, in TestFormatting() 83 {0.0, 1.0, ULocale.ENGLISH, FormatWidth.WIDE, MeasureUnit.INCH, "0–1 inches"}, in TestFormatting() 105 final MeasureUnit unit = (MeasureUnit) test[4]; in TestFormatting()
|
/external/icu/icu4c/source/i18n/unicode/ |
D | measunit.h | 38 class U_I18N_API MeasureUnit: public UObject { 46 MeasureUnit(); 52 MeasureUnit(const MeasureUnit &other); 58 MeasureUnit &operator=(const MeasureUnit &other); 71 virtual ~MeasureUnit(); 113 MeasureUnit *destArray, 131 MeasureUnit *destArray, 199 static MeasureUnit *resolveUnitPerUnit( 200 const MeasureUnit &unit, const MeasureUnit &perUnit); 217 static MeasureUnit *createGForce(UErrorCode &status); [all …]
|
D | measure.h | 29 class MeasureUnit; variable 55 Measure(const Formattable& number, MeasureUnit* adoptedUnit, 102 inline const MeasureUnit& getUnit() const; 147 MeasureUnit* unit; 154 inline const MeasureUnit& Measure::getUnit() const { in getUnit()
|
D | measfmt.h | 78 class MeasureUnit; variable 208 const MeasureUnit &perUnit, 224 UnicodeString getUnitDisplayName(const MeasureUnit& unit, UErrorCode &status) const; 346 const MeasureUnit &unit, UMeasureFormatWidth width, int32_t index) const; 349 const MeasureUnit &unit, UMeasureFormatWidth width, int32_t index, 353 const MeasureUnit &unit, UMeasureFormatWidth width, int32_t index, 362 const MeasureUnit &perUnit,
|
D | currunit.h | 37 class U_I18N_API CurrencyUnit: public MeasureUnit { 70 CurrencyUnit(const MeasureUnit& measureUnit, UErrorCode &ec);
|
/external/icu/icu4c/source/test/intltest/ |
D | measfmttest.cpp | 97 const MeasureUnit &unit, 98 const MeasureUnit &perUnit, 104 const MeasureUnit &unit, 105 const MeasureUnit &perUnit, 121 const MeasureUnit *unit, 177 LocalPointer<MeasureUnit> measureUnit; in TestCompatible53() 178 measureUnit.adoptInstead(MeasureUnit::createGForce(status)); in TestCompatible53() 179 measureUnit.adoptInstead(MeasureUnit::createArcMinute(status)); in TestCompatible53() 180 measureUnit.adoptInstead(MeasureUnit::createArcSecond(status)); in TestCompatible53() 181 measureUnit.adoptInstead(MeasureUnit::createDegree(status)); in TestCompatible53() [all …]
|
D | tufmtts.cpp | 188 MeasureUnit **ptrs = new MeasureUnit *[TimeUnit::UTIMEUNIT_FIELD_COUNT]; in testAPI() 190 ptrs[TimeUnit::UTIMEUNIT_YEAR] = MeasureUnit::createYear(status); in testAPI() 191 ptrs[TimeUnit::UTIMEUNIT_MONTH] = MeasureUnit::createMonth(status); in testAPI() 192 ptrs[TimeUnit::UTIMEUNIT_DAY] = MeasureUnit::createDay(status); in testAPI() 193 ptrs[TimeUnit::UTIMEUNIT_WEEK] = MeasureUnit::createWeek(status); in testAPI() 194 ptrs[TimeUnit::UTIMEUNIT_HOUR] = MeasureUnit::createHour(status); in testAPI() 195 ptrs[TimeUnit::UTIMEUNIT_MINUTE] = MeasureUnit::createMinute(status); in testAPI() 196 ptrs[TimeUnit::UTIMEUNIT_SECOND] = MeasureUnit::createSecond(status); in testAPI() 202 MeasureUnit *ptr = TimeUnit::createInstance(j, status); in testAPI() 208 MeasureUnit(*ptr) == *ptrs[j]); in testAPI()
|
D | numbertest.h | 74 MeasureUnit METER; 75 MeasureUnit DAY; 76 MeasureUnit SQUARE_METER; 77 MeasureUnit FAHRENHEIT;
|
D | numbertest_api.cpp | 29 MeasureUnit *unit = MeasureUnit::createMeter(status); in NumberFormatterApiTest() 36 unit = MeasureUnit::createDay(status); in NumberFormatterApiTest() 39 unit = MeasureUnit::createSquareMeter(status); in NumberFormatterApiTest() 42 unit = MeasureUnit::createFahrenheit(status); in NumberFormatterApiTest() 359 NumberFormatter::with().adoptUnit(new MeasureUnit(METER)), in unitMeasure() 373 NumberFormatter::with().adoptUnit(new MeasureUnit(METER)) in unitMeasure() 389 .adoptUnit(new MeasureUnit(METER)) in unitMeasure() 420 NumberFormatter::with().adoptUnit(new MeasureUnit(METER)), in unitMeasure() 428 NumberFormatter::with().adoptUnit(new MeasureUnit(DAY)) in unitMeasure() 437 NumberFormatter::with().adoptUnit(new MeasureUnit(DAY)) in unitMeasure() [all …]
|
/external/icu/android_icu4j/src/main/java/android/icu/text/ |
D | MeasureFormat.java | 47 import android.icu.util.MeasureUnit; 141 private static final Map<MeasureUnit, Integer> hmsTo012 = 142 new HashMap<MeasureUnit, Integer>(); 145 hmsTo012.put(MeasureUnit.HOUR, 0); in hmsTo012.put() 146 hmsTo012.put(MeasureUnit.MINUTE, 1); in hmsTo012.put() 147 hmsTo012.put(MeasureUnit.SECOND, 2); in hmsTo012.put() 370 MeasureUnit unit = lowValue.getUnit(); in formatMeasureRange() 482 MeasureUnit perUnit, in formatMeasurePerUnit() 485 MeasureUnit resolvedUnit = MeasureUnit.resolveUnitPerUnit( in formatMeasurePerUnit() 560 public String getUnitDisplayName(MeasureUnit unit) { in getUnitDisplayName() [all …]
|
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/ |
D | MeasureFormat.java | 46 import com.ibm.icu.util.MeasureUnit; 141 private static final Map<MeasureUnit, Integer> hmsTo012 = 142 new HashMap<MeasureUnit, Integer>(); 145 hmsTo012.put(MeasureUnit.HOUR, 0); in hmsTo012.put() 146 hmsTo012.put(MeasureUnit.MINUTE, 1); in hmsTo012.put() 147 hmsTo012.put(MeasureUnit.SECOND, 2); in hmsTo012.put() 387 MeasureUnit unit = lowValue.getUnit(); in formatMeasureRange() 500 MeasureUnit perUnit, in formatMeasurePerUnit() 503 MeasureUnit resolvedUnit = MeasureUnit.resolveUnitPerUnit( in formatMeasurePerUnit() 581 public String getUnitDisplayName(MeasureUnit unit) { in getUnitDisplayName() [all …]
|
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/number/ |
D | NumberFormatterApiTest.java | 36 import android.icu.util.MeasureUnit; 358 NumberFormatter.with().unit(MeasureUnit.METER), in unitMeasure() 373 NumberFormatter.with().unit(MeasureUnit.METER).unitWidth(UnitWidth.FULL_NAME), in unitMeasure() 388 NumberFormatter.with().notation(Notation.compactLong()).unit(MeasureUnit.METER) in unitMeasure() 406 new Measure(5.43, MeasureUnit.METER), in unitMeasure() 412 NumberFormatter.with().unit(MeasureUnit.METER), in unitMeasure() 420 NumberFormatter.with().unit(MeasureUnit.METER), in unitMeasure() 429 NumberFormatter.with().unit(MeasureUnit.DAY).unitWidth(UnitWidth.FULL_NAME), in unitMeasure() 438 NumberFormatter.with().unit(MeasureUnit.DAY).unitWidth(UnitWidth.NARROW), in unitMeasure() 448 NumberFormatter.with().unit(MeasureUnit.SQUARE_METER).unitWidth(UnitWidth.NARROW), in unitMeasure() [all …]
|
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/number/ |
D | NumberFormatterApiTest.java | 35 import com.ibm.icu.util.MeasureUnit; 355 NumberFormatter.with().unit(MeasureUnit.METER), in unitMeasure() 370 NumberFormatter.with().unit(MeasureUnit.METER).unitWidth(UnitWidth.FULL_NAME), in unitMeasure() 385 NumberFormatter.with().notation(Notation.compactLong()).unit(MeasureUnit.METER) in unitMeasure() 403 new Measure(5.43, MeasureUnit.METER), in unitMeasure() 409 NumberFormatter.with().unit(MeasureUnit.METER), in unitMeasure() 417 NumberFormatter.with().unit(MeasureUnit.METER), in unitMeasure() 426 NumberFormatter.with().unit(MeasureUnit.DAY).unitWidth(UnitWidth.FULL_NAME), in unitMeasure() 435 NumberFormatter.with().unit(MeasureUnit.DAY).unitWidth(UnitWidth.NARROW), in unitMeasure() 445 NumberFormatter.with().unit(MeasureUnit.SQUARE_METER).unitWidth(UnitWidth.NARROW), in unitMeasure() [all …]
|