ucar.unidata.metdata
Interface Value


public interface Value

Abstraction for the value a measured or calculated physical quantity.

Version:
$Revision: 1.7 $ $Date: 2005/05/13 18:31:31 $
Author:
$Author: jeffmc $

Method Summary
 StringBuffer format(StringBuffer buf)
          Format this Value
 double getDouble()
          Get the value as a double
 double getDouble(ucar.units.Unit outputUnit)
          Get the double value in a different Unit
 float getFloat()
          Get the float value
 float getFloat(ucar.units.Unit outputUnit)
          Get the float value in a different Unit
 int getInt()
          Get the value (as an integer) for this Value
 int getInt(ucar.units.Unit outputUnit)
          Get the value in a different Unit
 ucar.units.Unit getUnit()
          Get the Unit for this Value
 

Method Detail

getUnit

ucar.units.Unit getUnit()
Get the Unit for this Value

Returns:
the unit

getInt

int getInt()
Get the value (as an integer) for this Value

Returns:
integer value

getInt

int getInt(ucar.units.Unit outputUnit)
           throws ucar.units.ConversionException
Get the value in a different Unit

Parameters:
outputUnit - new unit
Returns:
value in that unit
Throws:
ucar.units.ConversionException - incompatible units

getFloat

float getFloat()
Get the float value

Returns:
value as a float

getFloat

float getFloat(ucar.units.Unit outputUnit)
               throws ucar.units.ConversionException
Get the float value in a different Unit

Parameters:
outputUnit - new Unit
Returns:
value in the new unit
Throws:
ucar.units.ConversionException - problem with conversion

getDouble

double getDouble()
Get the value as a double

Returns:
double value

getDouble

double getDouble(ucar.units.Unit outputUnit)
                 throws ucar.units.ConversionException
Get the double value in a different Unit

Parameters:
outputUnit - new Unit
Returns:
value in the new unit
Throws:
ucar.units.ConversionException - problem with conversion

format

StringBuffer format(StringBuffer buf)
Format this Value

Parameters:
buf - input/output buffer
Returns:
buf with formatted data