ucar.units
Interface Converter

All Known Implementing Classes:
ConverterImpl, TimeScaleUnit.MyConverter, UnitImpl.MyConverter

public interface Converter

Interface for converting numeric values from one unit to another.

Version:
$Id: Converter.java 64 2006-07-12 22:30:50Z edavis $
Author:
Steven R. Emmerson
See Also:
Unit.getConverterTo(Unit)

Method Summary
 double convert(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.
 float convert(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 as input.
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 as input.
Returns:
output.


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.