Package uk.ac.starlink.ttools.convert
Class SexagesimalToDegrees
- java.lang.Object
-
- uk.ac.starlink.ttools.convert.SexagesimalToDegrees
-
- All Implemented Interfaces:
ValueConverter
public class SexagesimalToDegrees extends java.lang.Object implements ValueConverter
Converts between Strings in sexagesimal format and numeric values in degrees.- Since:
- 24 Feb 2006
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description SexagesimalToDegrees(uk.ac.starlink.table.ValueInfo sexInfo, boolean hours)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectconvert(java.lang.Object in)Performs a conversion from the input type to the output type.uk.ac.starlink.table.ValueInfogetInputInfo()Returns metadata describing the values on the input end of the conversion.uk.ac.starlink.table.ValueInfogetOutputInfo()Returns metadata describing the values on the output end of the conversion.java.lang.StringtoString()java.lang.Objectunconvert(java.lang.Object out)Performs a reverse conversion, from the output type to the input type.
-
-
-
Method Detail
-
getInputInfo
public uk.ac.starlink.table.ValueInfo getInputInfo()
Description copied from interface:ValueConverterReturns metadata describing the values on the input end of the conversion.- Specified by:
getInputInfoin interfaceValueConverter- Returns:
- input info
-
getOutputInfo
public uk.ac.starlink.table.ValueInfo getOutputInfo()
Description copied from interface:ValueConverterReturns metadata describing the values on the output end of the conversion.- Specified by:
getOutputInfoin interfaceValueConverter- Returns:
- output info
-
convert
public java.lang.Object convert(java.lang.Object in)
Description copied from interface:ValueConverterPerforms 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:
convertin interfaceValueConverter- Parameters:
in- object of input type- Returns:
- corresponding object of output type
-
unconvert
public java.lang.Object unconvert(java.lang.Object out)
Description copied from interface:ValueConverterPerforms 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:
unconvertin interfaceValueConverter- Parameters:
out- object of output type- Returns:
- corresponding object of input type
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-