Class KgConverter
java.lang.Object
overit.geocall.util.measure.weights.WeightsConverter
overit.geocall.util.measure.weights.KgConverter
- All Implemented Interfaces:
Serializable,BaseConverter
This class implements the functions to convert kilograms to their base unit (kilograms) and vice versa.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal BigDecimalfromBaseUnit(BigDecimal value) Makes the conversions from the base uinit measurement value to the actual unit representation desired.
For example, from meters to kilometers or from meters to miles ecc.protected BigDecimalfinal BigDecimaltoBaseUnit(BigDecimal value) Makes the conversions from the actual unit representation value to the base uinit measurement value.
For example, the base unit for kilometers and miles are meters, the base units for the kilograms and pounds are the grams ecc.
-
Constructor Details
-
KgConverter
public KgConverter()
-
-
Method Details
-
getConversionFactor
- Specified by:
getConversionFactorin classWeightsConverter
-
toBaseUnit
Description copied from interface:BaseConverterMakes the conversions from the actual unit representation value to the base uinit measurement value.
For example, the base unit for kilometers and miles are meters, the base units for the kilograms and pounds are the grams ecc.- Specified by:
toBaseUnitin interfaceBaseConverter- Overrides:
toBaseUnitin classWeightsConverter- Parameters:
value- The value (with its current unit representation) from which start the conversion.- Returns:
- The base uinit measurement for the value.
-
fromBaseUnit
Description copied from interface:BaseConverterMakes the conversions from the base uinit measurement value to the actual unit representation desired.
For example, from meters to kilometers or from meters to miles ecc.- Specified by:
fromBaseUnitin interfaceBaseConverter- Overrides:
fromBaseUnitin classWeightsConverter- Parameters:
value- The value representing the base unit from which starting the conversion.- Returns:
- The current uinit measurement value representation desired.
-