Package ucar.units
Class UnitImpl.MyConverter
- java.lang.Object
-
- ucar.units.ConverterImpl
-
- ucar.units.UnitImpl.MyConverter
-
- All Implemented Interfaces:
Converter
- Enclosing class:
- UnitImpl
protected static class UnitImpl.MyConverter extends ConverterImpl
Provides support for converting numeric values from this unit to another unit.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MyConverter(Unit fromUnit, Unit toUnit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
convert(double amount)
Converts a numeric value.double[]
convert(double[] input, double[] output)
Converts an array of numeric values.float[]
convert(float[] input, float[] output)
Converts an array of numeric values.-
Methods inherited from class ucar.units.ConverterImpl
convert, convert, convert, create
-
-
-
-
Constructor Detail
-
MyConverter
protected MyConverter(Unit fromUnit, Unit toUnit) throws ConversionException
- Throws:
ConversionException
-
-
Method Detail
-
convert
public double convert(double amount)
Description copied from interface:Converter
Converts a numeric value.- Parameters:
amount
- The numeric value to convert.- Returns:
- The converted numeric value.
-
convert
public float[] convert(float[] input, float[] output)
Description copied from interface:Converter
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
public double[] convert(double[] input, double[] output)
Description copied from interface:Converter
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
.
-
-