Class ValueConverter.UnitValueConverter
java.lang.Object
uk.ac.starlink.vo.ValueConverter
uk.ac.starlink.vo.ValueConverter.UnitValueConverter
- Enclosing class:
ValueConverter
ValueConverter class which scales by a given factor
(represents a particular unit).
- Since:
- 21 Dec 2004
- Author:
- Mark Taylor (Starlink)
-
Nested Class Summary
Nested classes/interfaces inherited from class ValueConverter
ValueConverter.DMSDegreesValueConverter, ValueConverter.HMSDegreesValueConverter, ValueConverter.UnitValueConverter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleconvertValue(String sval) Converts a string value to a numeric for this formatunconvertValue(double dval) Converts a numeric value to a string value for this format.Methods inherited from class ValueConverter
getName, toString
-
Constructor Details
-
UnitValueConverter
Constructor.- Parameters:
name- unit namefactor- unit conversion factor
-
-
Method Details
-
convertValue
Description copied from class:ValueConverterConverts a string value to a numeric for this format- Specified by:
convertValuein classValueConverter- Parameters:
sval- string value- Returns:
- numeric equivalent of
sval
-
unconvertValue
Description copied from class:ValueConverterConverts a numeric value to a string value for this format.- Specified by:
unconvertValuein classValueConverter- Parameters:
dval- numeric value- Returns:
- string representation of
dval
-