Package ucar.units
Interface Converter
-
- All Known Implementing Classes:
ConverterImpl,TimeScaleUnit.MyConverter,UnitImpl.MyConverter
public interface ConverterInterface for converting numeric values from one unit to another.- See Also:
Unit.getConverterTo(Unit)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description doubleconvert(double amount)Converts a numeric value.double[]convert(double[] amounts)Converts an array of numeric values.double[]convert(double[] input, double[] output)Converts an array of numeric values.floatconvert(float amount)Converts a numeric value.float[]convert(float[] amounts)Converts an array of numeric values.float[]convert(float[] input, float[] output)Converts an array of numeric values.
-
-
-
Method Detail
-
convert
float convert(float amount)
Converts a numeric value.- Parameters:
amount- The numeric value to convert.- Returns:
- The converted numeric value.
-
convert
double convert(double amount)
Converts a numeric value.- Parameters:
amount- The numeric value to convert.- Returns:
- The converted numeric value.
-
convert
float[] convert(float[] amounts)
Converts an array of numeric values.- Parameters:
amounts- The numeric values to convert.- Returns:
- The converted numeric values in allocated space.
-
convert
double[] convert(double[] amounts)
Converts an array of numeric values.- Parameters:
amounts- The numeric values to convert.- Returns:
- The converted numeric values in allocated space.
-
convert
float[] convert(float[] input, float[] output)Converts an array of numeric values.- Parameters:
input- The numeric values to convert.output- The converted numeric values. May be same array asinput.- Returns:
output.
-
convert
double[] convert(double[] input, double[] output)Converts an array of numeric values.- Parameters:
input- The numeric values to convert.output- The converted numeric values. May be same array asinput.- Returns:
output.
-
-