/** * Converts a numeric value from this unit to another unit. * * @param amount * The numeric value. * @param outputUnit * The unit to which to convert the numeric value. * @return The numeric value in the output unit. * @throws ConversionException * The units aren't convertible. */ public double convertTo(final double amount, final Unit outputUnit) throws ConversionException { return getConverterTo(outputUnit).convert(amount); }
/** * Converts a numeric value from this unit to another unit. * * @param amount * The numeric value. * @param outputUnit * The unit to which to convert the numeric value. * @return The numeric value in the output unit. * @throws ConversionException * The units aren't convertible. */ public double convertTo(final double amount, final Unit outputUnit) throws ConversionException { return getConverterTo(outputUnit).convert(amount); }
/** * Converts numeric values from this unit to another unit. * * @param input * The input numeric values. * @param outputUnit * The unit to which to convert the numeric values. * @param output * The output numeric values. May be the same array as the input * values. * @return The numeric values in the output unit. * @throws ConversionException * The units aren't convertible. */ public float[] convertTo(final float[] input, final Unit outputUnit, final float[] output) throws ConversionException { return getConverterTo(outputUnit).convert(input, output); }
/** * Converts numeric values from this unit to another unit. * * @param input * The input numeric values. * @param outputUnit * The unit to which to convert the numeric values. * @param output * The output numeric values. May be the same array as the input * values. * @return The numeric values in the output unit. * @throws ConversionException * The units aren't convertible. */ public double[] convertTo(final double[] input, final Unit outputUnit, final double[] output) throws ConversionException { return getConverterTo(outputUnit).convert(input, output); }
/** * Converts numeric values from this unit to another unit. * * @param input * The input numeric values. * @param outputUnit * The unit to which to convert the numeric values. * @param output * The output numeric values. May be the same array as the input * values. * @return The numeric values in the output unit. * @throws ConversionException * The units aren't convertible. */ public float[] convertTo(final float[] input, final Unit outputUnit, final float[] output) throws ConversionException { return getConverterTo(outputUnit).convert(input, output); }
/** * Converts numeric values from this unit to another unit. * * @param input * The input numeric values. * @param outputUnit * The unit to which to convert the numeric values. * @param output * The output numeric values. May be the same array as the input * values. * @return The numeric values in the output unit. * @throws ConversionException * The units aren't convertible. */ public double[] convertTo(final double[] input, final Unit outputUnit, final double[] output) throws ConversionException { return getConverterTo(outputUnit).convert(input, output); }