Home
last modified time | relevance | path

Searched refs:MeasureUnit (Results 1 – 25 of 38) sorted by relevance

12

/external/icu/icu4c/source/i18n/
Dmeasunit.cpp24 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(MeasureUnit)
506 MeasureUnit *MeasureUnit::createGForce(UErrorCode &status) { in createGForce()
507 return MeasureUnit::create(0, 0, status); in createGForce()
510 MeasureUnit *MeasureUnit::createMeterPerSecondSquared(UErrorCode &status) { in createMeterPerSecondSquared()
511 return MeasureUnit::create(0, 1, status); in createMeterPerSecondSquared()
514 MeasureUnit *MeasureUnit::createArcMinute(UErrorCode &status) { in createArcMinute()
515 return MeasureUnit::create(1, 0, status); in createArcMinute()
518 MeasureUnit *MeasureUnit::createArcSecond(UErrorCode &status) { in createArcSecond()
519 return MeasureUnit::create(1, 1, status); in createArcSecond()
522 MeasureUnit *MeasureUnit::createDegree(UErrorCode &status) { in createDegree()
[all …]
Dcurrunit.cpp35 MeasureUnit(other) { in CurrencyUnit()
43 MeasureUnit::operator=(other); in operator =()
Dtmunit.cpp101 : MeasureUnit(other), fTimeUnitField(other.fTimeUnitField) { in TimeUnit()
114 MeasureUnit::operator=(other); in operator =()
Dmeasure.cpp26 Measure::Measure(const Formattable& _number, MeasureUnit* adoptedUnit, in Measure()
44 unit = (MeasureUnit*) other.unit->clone(); in operator =()
Dmeasfmt.cpp179 static UBool isCurrency(const MeasureUnit &unit) { in isCurrency()
268 outer.unitIndex = MeasureUnit::internalGetIndexForTypeAndSubtype(outer.type, key); in getOrCreateTableSink()
510 static UBool isTimeUnit(const MeasureUnit &mu, const char *tu) { in isTimeUnit()
714 const MeasureUnit &perUnit, in formatMeasurePerUnit()
721 MeasureUnit *resolvedUnit = in formatMeasurePerUnit()
722 MeasureUnit::resolveUnitPerUnit(measure.getUnit(), perUnit); in formatMeasurePerUnit()
890 const MeasureUnit& amtUnit = measure.getUnit(); in formatMeasure()
1037 const MeasureUnit &unit, UMeasureFormatWidth width, int32_t index) const { in getFormatterOrNull()
1052 const MeasureUnit &unit, UMeasureFormatWidth width, int32_t index, in getFormatter()
1065 const MeasureUnit &unit, UMeasureFormatWidth width, int32_t index, in getPluralFormatter()
[all …]
/external/icu/android_icu4j/src/main/java/android/icu/util/
DMeasureUnit.java37 public class MeasureUnit implements Serializable { class
43 private static final Map<String, Map<String,MeasureUnit>> cache
44 = new HashMap<String, Map<String,MeasureUnit>>();
68 protected MeasureUnit(String type, String subType) { in MeasureUnit() method in MeasureUnit
106 if (!(rhs instanceof MeasureUnit)) { in equals()
109 MeasureUnit c = (MeasureUnit) rhs; in equals()
133 public synchronized static Set<MeasureUnit> getAvailable(String type) { in getAvailable()
134 Map<String, MeasureUnit> units = cache.get(type); in getAvailable()
137 return units == null ? Collections.<MeasureUnit>emptySet() in getAvailable()
138 : Collections.unmodifiableSet(new HashSet<MeasureUnit>(units.values())); in getAvailable()
[all …]
DMeasure.java34 private final MeasureUnit unit;
41 public Measure(Number number, MeasureUnit unit) { in Measure()
110 public MeasureUnit getUnit() { in getUnit()
DTimeUnit.java19 public class TimeUnit extends MeasureUnit {
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/util/
DMeasureUnit.java37 public class MeasureUnit implements Serializable { class
43 private static final Map<String, Map<String,MeasureUnit>> cache
44 = new HashMap<String, Map<String,MeasureUnit>>();
65 protected MeasureUnit(String type, String subType) { in MeasureUnit() method in MeasureUnit
111 if (!(rhs instanceof MeasureUnit)) { in equals()
114 MeasureUnit c = (MeasureUnit) rhs; in equals()
143 public synchronized static Set<MeasureUnit> getAvailable(String type) { in getAvailable()
144 Map<String, MeasureUnit> units = cache.get(type); in getAvailable()
147 return units == null ? Collections.<MeasureUnit>emptySet() in getAvailable()
148 : Collections.unmodifiableSet(new HashSet<MeasureUnit>(units.values())); in getAvailable()
[all …]
DMeasure.java34 private final MeasureUnit unit;
42 public Measure(Number number, MeasureUnit unit) { in Measure()
116 public MeasureUnit getUnit() { in getUnit()
DTimeUnit.java20 public class TimeUnit extends MeasureUnit {
/external/icu/icu4c/source/i18n/unicode/
Dmeasunit.h36 class U_I18N_API MeasureUnit: public UObject {
43 MeasureUnit() : fTypeId(0), fSubTypeId(0) { in MeasureUnit() function
51 MeasureUnit(const MeasureUnit &other);
57 MeasureUnit &operator=(const MeasureUnit &other);
70 virtual ~MeasureUnit();
112 MeasureUnit *destArray,
130 MeasureUnit *destArray,
198 static MeasureUnit *resolveUnitPerUnit(
199 const MeasureUnit &unit, const MeasureUnit &perUnit);
216 static MeasureUnit *createGForce(UErrorCode &status);
[all …]
Dmeasure.h27 class MeasureUnit; variable
53 Measure(const Formattable& number, MeasureUnit* adoptedUnit,
100 inline const MeasureUnit& getUnit() const;
145 MeasureUnit* unit;
152 inline const MeasureUnit& Measure::getUnit() const { in getUnit()
Dmeasfmt.h74 class MeasureUnit; variable
205 const MeasureUnit &perUnit,
331 const MeasureUnit &unit, UMeasureFormatWidth width, int32_t index) const;
334 const MeasureUnit &unit, UMeasureFormatWidth width, int32_t index,
338 const MeasureUnit &unit, UMeasureFormatWidth width, int32_t index,
347 const MeasureUnit &perUnit,
Dcurrunit.h35 class U_I18N_API CurrencyUnit: public MeasureUnit {
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/
DMeasureUnitTest.java36 import com.ibm.icu.util.MeasureUnit;
241 MeasureUnit[] units = { in TestCompatible53_1()
242 MeasureUnit.G_FORCE, in TestCompatible53_1()
243 MeasureUnit.DEGREE, in TestCompatible53_1()
244 MeasureUnit.ARC_MINUTE, in TestCompatible53_1()
245 MeasureUnit.ARC_SECOND, in TestCompatible53_1()
246 MeasureUnit.ACRE, in TestCompatible53_1()
247 MeasureUnit.HECTARE, in TestCompatible53_1()
248 MeasureUnit.SQUARE_FOOT, in TestCompatible53_1()
249 MeasureUnit.SQUARE_KILOMETER, in TestCompatible53_1()
[all …]
DPluralRangesTest.java20 import com.ibm.icu.util.MeasureUnit;
72 … {0.0, 1.0, ULocale.FRANCE, FormatWidth.WIDE, MeasureUnit.FAHRENHEIT, "0–1 degré Fahrenheit"}, in TestFormatting()
73 … {1.0, 2.0, ULocale.FRANCE, FormatWidth.WIDE, MeasureUnit.FAHRENHEIT, "1–2 degrés Fahrenheit"}, in TestFormatting()
74 … {3.1, 4.25, ULocale.FRANCE, FormatWidth.SHORT, MeasureUnit.FAHRENHEIT, "3,1–4,25 °F"}, in TestFormatting()
75 … {3.1, 4.25, ULocale.ENGLISH, FormatWidth.SHORT, MeasureUnit.FAHRENHEIT, "3.1–4.25°F"}, in TestFormatting()
76 {3.1, 4.25, ULocale.CHINESE, FormatWidth.WIDE, MeasureUnit.INCH, "3.1-4.25英寸"}, in TestFormatting()
77 {0.0, 1.0, ULocale.ENGLISH, FormatWidth.WIDE, MeasureUnit.INCH, "0–1 inches"}, in TestFormatting()
99 final MeasureUnit unit = (MeasureUnit) test[4]; in TestFormatting()
DTimeUnitTest.java19 import com.ibm.icu.util.MeasureUnit;
411 Measure measure = new Measure(23, MeasureUnit.CELSIUS); in TestStandInForMeasureFormat()
418 new Measure(70, MeasureUnit.FOOT), in TestStandInForMeasureFormat()
419 new Measure(5.3, MeasureUnit.INCH))); in TestStandInForMeasureFormat()
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/
DMeasureUnitTest.java37 import android.icu.util.MeasureUnit;
245 MeasureUnit[] units = { in TestCompatible53_1()
246 MeasureUnit.G_FORCE, in TestCompatible53_1()
247 MeasureUnit.DEGREE, in TestCompatible53_1()
248 MeasureUnit.ARC_MINUTE, in TestCompatible53_1()
249 MeasureUnit.ARC_SECOND, in TestCompatible53_1()
250 MeasureUnit.ACRE, in TestCompatible53_1()
251 MeasureUnit.HECTARE, in TestCompatible53_1()
252 MeasureUnit.SQUARE_FOOT, in TestCompatible53_1()
253 MeasureUnit.SQUARE_KILOMETER, in TestCompatible53_1()
[all …]
DPluralRangesTest.java21 import android.icu.util.MeasureUnit;
76 … {0.0, 1.0, ULocale.FRANCE, FormatWidth.WIDE, MeasureUnit.FAHRENHEIT, "0–1 degré Fahrenheit"}, in TestFormatting()
77 … {1.0, 2.0, ULocale.FRANCE, FormatWidth.WIDE, MeasureUnit.FAHRENHEIT, "1–2 degrés Fahrenheit"}, in TestFormatting()
78 … {3.1, 4.25, ULocale.FRANCE, FormatWidth.SHORT, MeasureUnit.FAHRENHEIT, "3,1–4,25 °F"}, in TestFormatting()
79 … {3.1, 4.25, ULocale.ENGLISH, FormatWidth.SHORT, MeasureUnit.FAHRENHEIT, "3.1–4.25°F"}, in TestFormatting()
80 {3.1, 4.25, ULocale.CHINESE, FormatWidth.WIDE, MeasureUnit.INCH, "3.1-4.25英寸"}, in TestFormatting()
81 {0.0, 1.0, ULocale.ENGLISH, FormatWidth.WIDE, MeasureUnit.INCH, "0–1 inches"}, in TestFormatting()
103 final MeasureUnit unit = (MeasureUnit) test[4]; in TestFormatting()
DTimeUnitTest.java20 import android.icu.util.MeasureUnit;
415 Measure measure = new Measure(23, MeasureUnit.CELSIUS); in TestStandInForMeasureFormat()
422 new Measure(70, MeasureUnit.FOOT), in TestStandInForMeasureFormat()
423 new Measure(5.3, MeasureUnit.INCH))); in TestStandInForMeasureFormat()
/external/icu/icu4c/source/test/intltest/
Dmeasfmttest.cpp87 const MeasureUnit &unit,
88 const MeasureUnit &perUnit,
94 const MeasureUnit &unit,
95 const MeasureUnit &perUnit,
151 LocalPointer<MeasureUnit> measureUnit; in TestCompatible53_1()
152 measureUnit.adoptInstead(MeasureUnit::createGForce(status)); in TestCompatible53_1()
153 measureUnit.adoptInstead(MeasureUnit::createArcMinute(status)); in TestCompatible53_1()
154 measureUnit.adoptInstead(MeasureUnit::createArcSecond(status)); in TestCompatible53_1()
155 measureUnit.adoptInstead(MeasureUnit::createDegree(status)); in TestCompatible53_1()
156 measureUnit.adoptInstead(MeasureUnit::createAcre(status)); in TestCompatible53_1()
[all …]
Dtufmtts.cpp186 MeasureUnit **ptrs = new MeasureUnit *[TimeUnit::UTIMEUNIT_FIELD_COUNT]; in testAPI()
188 ptrs[TimeUnit::UTIMEUNIT_YEAR] = MeasureUnit::createYear(status); in testAPI()
189 ptrs[TimeUnit::UTIMEUNIT_MONTH] = MeasureUnit::createMonth(status); in testAPI()
190 ptrs[TimeUnit::UTIMEUNIT_DAY] = MeasureUnit::createDay(status); in testAPI()
191 ptrs[TimeUnit::UTIMEUNIT_WEEK] = MeasureUnit::createWeek(status); in testAPI()
192 ptrs[TimeUnit::UTIMEUNIT_HOUR] = MeasureUnit::createHour(status); in testAPI()
193 ptrs[TimeUnit::UTIMEUNIT_MINUTE] = MeasureUnit::createMinute(status); in testAPI()
194 ptrs[TimeUnit::UTIMEUNIT_SECOND] = MeasureUnit::createSecond(status); in testAPI()
200 MeasureUnit *ptr = TimeUnit::createInstance(j, status); in testAPI()
206 MeasureUnit(*ptr) == *ptrs[j]); in testAPI()
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
DMeasureFormat.java44 import com.ibm.icu.util.MeasureUnit;
139 private static final Map<MeasureUnit, Integer> hmsTo012 =
140 new HashMap<MeasureUnit, Integer>();
143 hmsTo012.put(MeasureUnit.HOUR, 0); in hmsTo012.put()
144 hmsTo012.put(MeasureUnit.MINUTE, 1); in hmsTo012.put()
145 hmsTo012.put(MeasureUnit.SECOND, 2); in hmsTo012.put()
385 MeasureUnit unit = lowValue.getUnit(); in formatMeasureRange()
498 MeasureUnit perUnit, in formatMeasurePerUnit()
501 MeasureUnit resolvedUnit = MeasureUnit.resolveUnitPerUnit( in formatMeasurePerUnit()
801 unit = MeasureUnit.internalGetInstance(type, key.toString()); // never null in getOrCreateTableSink()
[all …]
/external/icu/android_icu4j/src/main/java/android/icu/text/
DMeasureFormat.java45 import android.icu.util.MeasureUnit;
139 private static final Map<MeasureUnit, Integer> hmsTo012 =
140 new HashMap<MeasureUnit, Integer>();
143 hmsTo012.put(MeasureUnit.HOUR, 0); in hmsTo012.put()
144 hmsTo012.put(MeasureUnit.MINUTE, 1); in hmsTo012.put()
145 hmsTo012.put(MeasureUnit.SECOND, 2); in hmsTo012.put()
368 MeasureUnit unit = lowValue.getUnit(); in formatMeasureRange()
480 MeasureUnit perUnit, in formatMeasurePerUnit()
483 MeasureUnit resolvedUnit = MeasureUnit.resolveUnitPerUnit( in formatMeasurePerUnit()
774 unit = MeasureUnit.internalGetInstance(type, key.toString()); // never null in getOrCreateTableSink()
[all …]

12