Class UnitsConverter
java.lang.Object
org.graalvm.shadowed.com.ibm.icu.impl.units.UnitsConverter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enum -
Constructor Summary
ConstructorsConstructorDescriptionUnitsConverter(String sourceIdentifier, String targetIdentifier) Constructor ofUnitsConverter.UnitsConverter(MeasureUnitImpl source, MeasureUnitImpl target, ConversionRates conversionRates) Constructor ofUnitsConverter. -
Method Summary
Modifier and TypeMethodDescriptionconvert(BigDecimal inputValue) convertInverse(BigDecimal inputValue) extractConvertibility(MeasureUnitImpl source, MeasureUnitImpl target, ConversionRates conversionRates) toString()
-
Constructor Details
-
UnitsConverter
Constructor ofUnitsConverter. NOTE: - source and target must be under the same category - e.g. meter to mile --> both of them are length units.NOTE: This constructor creates an instance of
UnitsConverterinternally.- Parameters:
sourceIdentifier- represents the source unit identifier.targetIdentifier- represents the target unit identifier.
-
UnitsConverter
public UnitsConverter(MeasureUnitImpl source, MeasureUnitImpl target, ConversionRates conversionRates) Constructor ofUnitsConverter. NOTE: - source and target must be under the same category - e.g. meter to mile --> both of them are length units. This converts from source to base to target (one of those may be a no-op).- Parameters:
source- represents the source unit.target- represents the target unit.conversionRates- contains all the needed conversion rates.
-
-
Method Details
-
extractConvertibility
public static UnitsConverter.Convertibility extractConvertibility(MeasureUnitImpl source, MeasureUnitImpl target, ConversionRates conversionRates) -
convert
-
convertInverse
-
getConversionInfo
-
toString
-