public class LengthConverter extends Converter
KILOMETER_IN_METERS| Constructor and Description |
|---|
LengthConverter() |
| Modifier and Type | Method and Description |
|---|---|
protected double |
fromBaseTo(double in,
MeasurementUnit unit)
Converts a value from base unit to unit of the given type.
|
protected double |
toBaseUnit(double in,
MeasurementUnit unit)
Converts a value of given unit to the base unit.
|
protected double toBaseUnit(double in,
MeasurementUnit unit)
ConvertertoBaseUnit in class Converterin - a value to be converted.unit - a MeasurementUnit to be converted to base.protected double fromBaseTo(double in,
MeasurementUnit unit)
ConverterfromBaseTo in class Converterin - a value to be converted.unit - a target MeasurementUnit.