Package 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
Modifier and TypeMethodDescriptionformat
(StringBuffer buf) Format this Valuedouble
Get the value as a doubledouble
getDouble
(ucar.units.Unit outputUnit) Get the double value in a different Unitfloat
getFloat()
Get the float valuefloat
getFloat
(ucar.units.Unit outputUnit) Get the float value in a different Unitint
getInt()
Get the value (as an integer) for this Valueint
getInt
(ucar.units.Unit outputUnit) Get the value in a different Unitucar.units.Unit
getUnit()
Get theUnit
for this Value
-
Method Details
-
getUnit
ucar.units.Unit getUnit()Get theUnit
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
Format this Value- Parameters:
buf
- input/output buffer- Returns:
buf
with formatted data
-