Package uk.ac.starlink.ttools.convert
Interface ValueConverter
- All Known Implementing Classes:
Iso8601Converter
,Iso8601ToDecimalYear
,Iso8601ToJulian
,SexagesimalToDegrees
public interface ValueConverter
Defines a conversion from one data type to another.
Instances of this class should be thread-safe.
- Since:
- 24 Feb 2006
- Author:
- Mark Taylor
-
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.Performs a reverse conversion, from the output type to the input type.
-
Method Details
-
getInputInfo
uk.ac.starlink.table.ValueInfo getInputInfo()Returns metadata describing the values on the input end of the conversion.- Returns:
- input info
-
getOutputInfo
uk.ac.starlink.table.ValueInfo getOutputInfo()Returns metadata describing the values on the output end of the conversion.- Returns:
- output info
-
convert
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.- Parameters:
in
- object of input type- Returns:
- corresponding object of output type
-
unconvert
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.- Parameters:
out
- object of output type- Returns:
- corresponding object of input type
-