Home
last modified time | relevance | path

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

/external/icu/android_icu4j/src/main/java/android/icu/impl/units/
DUnitsRouter.java117 converterPreference.targetUnit in route()
159 final MeasureUnitImpl targetUnit; field in UnitsRouter.ConverterPreference
165 public ConverterPreference(MeasureUnitImpl source, MeasureUnitImpl targetUnit, in ConverterPreference() argument
167 this(source, targetUnit, BigDecimal.valueOf(Double.MIN_VALUE), precision, in ConverterPreference()
171 public ConverterPreference(MeasureUnitImpl source, MeasureUnitImpl targetUnit, in ConverterPreference() argument
173 this.converter = new ComplexUnitsConverter(source, targetUnit, conversionRates); in ConverterPreference()
176 this.targetUnit = targetUnit; in ConverterPreference()
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/units/
DUnitsRouter.java115 converterPreference.targetUnit in route()
156 final MeasureUnitImpl targetUnit; field in UnitsRouter.ConverterPreference
162 public ConverterPreference(MeasureUnitImpl source, MeasureUnitImpl targetUnit, in ConverterPreference() argument
164 this(source, targetUnit, BigDecimal.valueOf(Double.MIN_VALUE), precision, in ConverterPreference()
168 public ConverterPreference(MeasureUnitImpl source, MeasureUnitImpl targetUnit, in ConverterPreference() argument
170 this.converter = new ComplexUnitsConverter(source, targetUnit, conversionRates); in ConverterPreference()
173 this.targetUnit = targetUnit; in ConverterPreference()
/external/icu/icu4c/source/i18n/
Dunits_router.h62 MeasureUnitImpl targetUnit; member
74 precision(std::move(precision)), targetUnit(complexTarget.copy(status)) {} in ConverterPreference()
Dunits_router.cpp120 converterPreference->targetUnit.copy(status)); in route()
/external/icu/libicu/cts_headers/
Dunits_router.h62 MeasureUnitImpl targetUnit; member
74 precision(std::move(precision)), targetUnit(complexTarget.copy(status)) {} in ConverterPreference()
/external/cldr/tools/cldr-unittest/src/org/unicode/cldr/unittest/
DNistUnits.java130 … final String targetUnit = getUnitFromSymbols(expressionInBaseSymbols, _symbolToUnit); in try() local
131 …unitToTargetInfo.put(name, new TargetInfo(targetUnit, new ConversionInfo(Rational.ONE, Rational.ZE… in try()
133 …itConversionData data = new ExternalUnitConversionData(quantity, name, targetUnit, Rational.ONE, l… in try()
DTestUnits.java255 String targetUnit = compoundTest[0]; in TestCompoundUnit3() local
270 … String targetUnitPath = ExampleGenerator.format(PATH_UNIT_PATTERN, len, targetUnit, countString); in TestCompoundUnit3()
378 String targetUnit = test[2].toString(); in TestConversion() local
380 final Rational convert = converter.convertDirect(Rational.ONE, sourceUnit, targetUnit); in TestConversion()
381 assertEquals(sourceUnit + " to " + targetUnit, Rational.of(numerator, 1), convert); in TestConversion()
1014 final String targetUnit = test[2]; in TestSpecialCases() local
1016 … final Rational conversion = converter.convert(sourceValue, sourceUnit, targetUnit, SHOW_DATA); in TestSpecialCases()
1017 …if (!assertEquals(count++ + ") " + sourceValue + " " + sourceUnit + " ⟹ " + targetUnit, expectedVa… in TestSpecialCases()
1018 converter.convert(sourceValue, sourceUnit, targetUnit, SHOW_DATA); in TestSpecialCases()
1082 for (String targetUnit : comparableUnits) { in printUnits()
[all …]
/external/cldr/tools/java/org/unicode/cldr/util/
DUnitConverter.java461 public Rational convertDirect(Rational source, String sourceUnit, String targetUnit) { in convertDirect() argument
462 if (sourceUnit.equals(targetUnit)) { in convertDirect()
469 TargetInfo fromPivotInfo = sourceToTargetInfo.get(targetUnit); in convertDirect()
1318 …public Rational convert(Rational sourceValue, String sourceUnit, final String targetUnit, boolean … in convert() argument
1320 … System.out.println(showRational("\nconvert:\t", sourceValue, sourceUnit) + " ⟹ " + targetUnit); in convert()
1332 if (showYourWork) System.out.println("invert:\t" + targetUnit); in convert()
1333 ConversionInfo targetConversionInfo = parseUnitId(targetUnit, targetBase, showYourWork); in convert()
1335 if (showYourWork) System.out.println("! unknown unit: " + targetUnit); in convert()
1346 …if (showYourWork) System.out.println("! incomparable units: " + sourceUnit + " and " + targetUnit); in convert()
1354 if (showYourWork) System.out.println(showRational("target:\t", result, targetUnit)); in convert()
/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/
DSharedResourceHolderTest.java232 public long getDelay(TimeUnit targetUnit) { in getDelay() argument
233 return targetUnit.convert(this.delay, this.unit); in getDelay()
/external/icu/icu4c/source/test/intltest/
Dunits_test.cpp374 MeasureUnitImpl targetUnit = MeasureUnitImpl::forIdentifier(y, status); in unitsTestDataLineFn() local
386 …auto convertibility = extractConvertibility(sourceUnit, targetUnit, *ctx->conversionRates, status); in unitsTestDataLineFn()
402 UnitConverter converter(sourceUnit, targetUnit, *ctx->conversionRates, status); in unitsTestDataLineFn()