Home
last modified time | relevance | path

Searched refs:Convertibility (Results 1 – 10 of 10) sorted by relevance

/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/units/
DUnitsConverter.java51 Convertibility convertibility = extractConvertibility(source, target, conversionRates); in UnitsConverter()
52 … if (convertibility != Convertibility.CONVERTIBLE && convertibility != Convertibility.RECIPROCAL) { in UnitsConverter()
59 if (convertibility == Convertibility.CONVERTIBLE) { in UnitsConverter()
62 assert convertibility == Convertibility.RECIPROCAL; in UnitsConverter()
65 this.reciprocal = convertibility == Convertibility.RECIPROCAL; in UnitsConverter()
70 assert convertibility != Convertibility.RECIPROCAL || this.offset == BigDecimal.ZERO; in UnitsConverter()
73 …static public Convertibility extractConvertibility(MeasureUnitImpl source, MeasureUnitImpl target,… in extractConvertibility()
82 if (areDimensionsZeroes(dimensionMap)) return Convertibility.CONVERTIBLE; in extractConvertibility()
85 if (areDimensionsZeroes(dimensionMap)) return Convertibility.RECIPROCAL; in extractConvertibility()
87 return Convertibility.UNCONVERTIBLE; in extractConvertibility()
[all …]
DConversionRates.java64 … sourceToBase, UnitsConverter.Factor targetToBase, UnitsConverter.Convertibility convertibility) { in getOffset()
65 … if (convertibility != UnitsConverter.Convertibility.CONVERTIBLE) return BigDecimal.valueOf(0); in getOffset()
/third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/impl/
DUnitsTest.java255 UnitsConverter.Convertibility expected;
257 TestData(String source, String target, UnitsConverter.Convertibility convertibility) {
265 new TestData("meter", "foot", UnitsConverter.Convertibility.CONVERTIBLE),
266 new TestData("kilometer", "foot", UnitsConverter.Convertibility.CONVERTIBLE),
267 new TestData("hectare", "square-foot", UnitsConverter.Convertibility.CONVERTIBLE),
268 …new TestData("kilometer-per-second", "second-per-meter", UnitsConverter.Convertibility.RECIPROCAL),
269 … new TestData("square-meter", "square-foot", UnitsConverter.Convertibility.CONVERTIBLE),
270 …new TestData("kilometer-per-second", "foot-per-second", UnitsConverter.Convertibility.CONVERTIBLE),
271 … new TestData("square-hectare", "pow4-foot", UnitsConverter.Convertibility.CONVERTIBLE),
272 …square-kilometer-per-second", "second-per-square-meter", UnitsConverter.Convertibility.RECIPROCAL),
[all …]
/third_party/icu/icu4c/source/i18n/
Dunits_converter.cpp278 const MeasureUnitImpl &target, Convertibility unitsState, in loadConversionRate()
290 if (unitsState == Convertibility::CONVERTIBLE) { in loadConversionRate()
292 } else if (unitsState == Convertibility::RECIPROCAL) { in loadConversionRate()
315 conversionRate.reciprocal = unitsState == Convertibility::RECIPROCAL; in loadConversionRate()
464 Convertibility U_I18N_API extractConvertibility(const MeasureUnitImpl &source, in extractConvertibility()
528 Convertibility unitsState = extractConvertibility(this->conversionRate_.source, in init()
531 if (unitsState == Convertibility::UNCONVERTIBLE) { in init()
554 Convertibility unitsState = extractConvertibility(firstUnit, secondUnit, ratesInfo, status); in compareTwoUnits()
559 if (unitsState == Convertibility::UNCONVERTIBLE || unitsState == Convertibility::RECIPROCAL) { in compareTwoUnits()
Dunits_converter.h119 enum Convertibility { enum
140 Convertibility U_I18N_API extractConvertibility(const MeasureUnitImpl &source,
/third_party/node/deps/icu-small/source/i18n/
Dunits_converter.cpp278 const MeasureUnitImpl &target, Convertibility unitsState, in loadConversionRate()
290 if (unitsState == Convertibility::CONVERTIBLE) { in loadConversionRate()
292 } else if (unitsState == Convertibility::RECIPROCAL) { in loadConversionRate()
315 conversionRate.reciprocal = unitsState == Convertibility::RECIPROCAL; in loadConversionRate()
472 Convertibility U_I18N_API extractConvertibility(const MeasureUnitImpl &source, in extractConvertibility()
536 Convertibility unitsState = extractConvertibility(this->conversionRate_.source, in init()
539 if (unitsState == Convertibility::UNCONVERTIBLE) { in init()
562 Convertibility unitsState = extractConvertibility(firstUnit, secondUnit, ratesInfo, status); in compareTwoUnits()
567 if (unitsState == Convertibility::UNCONVERTIBLE || unitsState == Convertibility::RECIPROCAL) { in compareTwoUnits()
Dunits_converter.h127 enum Convertibility { enum
148 Convertibility U_I18N_API extractConvertibility(const MeasureUnitImpl &source,
/third_party/skia/third_party/externals/icu/source/i18n/
Dunits_converter.cpp277 const MeasureUnitImpl &target, Convertibility unitsState, in loadConversionRate()
289 if (unitsState == Convertibility::CONVERTIBLE) { in loadConversionRate()
291 } else if (unitsState == Convertibility::RECIPROCAL) { in loadConversionRate()
314 conversionRate.reciprocal = unitsState == Convertibility::RECIPROCAL; in loadConversionRate()
457 Convertibility U_I18N_API extractConvertibility(const MeasureUnitImpl &source, in extractConvertibility()
521 Convertibility unitsState = extractConvertibility(this->conversionRate_.source, in init()
524 if (unitsState == Convertibility::UNCONVERTIBLE) { in init()
547 Convertibility unitsState = extractConvertibility(firstUnit, secondUnit, ratesInfo, status); in compareTwoUnits()
552 if (unitsState == Convertibility::UNCONVERTIBLE || unitsState == Convertibility::RECIPROCAL) { in compareTwoUnits()
Dunits_converter.h113 enum Convertibility { enum
134 Convertibility U_I18N_API extractConvertibility(const MeasureUnitImpl &source,
/third_party/icu/icu4c/source/test/intltest/
Dunits_test.cpp129 const Convertibility expectedState; in testExtractConvertibility()