Package uk.ac.starlink.ttools.convert
Class SexagesimalToDegrees
java.lang.Object
uk.ac.starlink.ttools.convert.SexagesimalToDegrees
- All Implemented Interfaces:
ValueConverter
Converts between Strings in sexagesimal format and numeric values in
degrees.
- Since:
- 24 Feb 2006
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPerforms a conversion from the input type to the output type.uk.ac.starlink.table.ValueInfo
Returns metadata describing the values on the input end of the conversion.uk.ac.starlink.table.ValueInfo
Returns metadata describing the values on the output end of the conversion.toString()
Performs a reverse conversion, from the output type to the input type.
-
Constructor Details
-
SexagesimalToDegrees
public SexagesimalToDegrees(uk.ac.starlink.table.ValueInfo sexInfo, boolean hours) - Parameters:
sexInfo
- info for data in sexagesimal formathours
- true for H:M:S, false for D:M:S
-
-
Method Details
-
getInputInfo
public uk.ac.starlink.table.ValueInfo getInputInfo()Description copied from interface:ValueConverter
Returns metadata describing the values on the input end of the conversion.- Specified by:
getInputInfo
in interfaceValueConverter
- Returns:
- input info
-
getOutputInfo
public uk.ac.starlink.table.ValueInfo getOutputInfo()Description copied from interface:ValueConverter
Returns metadata describing the values on the output end of the conversion.- Specified by:
getOutputInfo
in interfaceValueConverter
- Returns:
- output info
-
convert
Description copied from interface:ValueConverter
Performs a conversion from the input type to the output type. In general if the conversion cannot be done, a null value should be returned rather than throwing an unchecked exception.- Specified by:
convert
in interfaceValueConverter
- Parameters:
in
- object of input type- Returns:
- corresponding object of output type
-
unconvert
Description copied from interface:ValueConverter
Performs a reverse conversion, from the output type to the input type. In general if the conversion cannot be done, a null value should be returned rather than throwing an unchecked exception.- Specified by:
unconvert
in interfaceValueConverter
- Parameters:
out
- object of output type- Returns:
- corresponding object of input type
-
toString
-