Class Conversions

java.lang.Object
uk.ac.starlink.ttools.convert.Conversions

public class Conversions extends Object
Utility functions for converting between value types.

Note: The functionality provided here predates the DomainMapper machinery (see ValueInfo.getDomainMappers()), and using it may interfere with that. At time of writing this note however, DomainMapper implementation and use is not complete either. When DomainMappers are working properly, use of this class should be phased out. The class is currently configured to perform conversions for (sexagesimal) angles, but not for ISO-8601 time representations, since time is handled by DomainMappers. But there may still be opportunities for nasty surprises.

Since:
24 Feb 2006
Author:
Mark Taylor
  • Method Details

    • getNumericConverter

      public static ValueConverter getNumericConverter(uk.ac.starlink.table.ValueInfo info)
      Returns a converter from the given ValueInfo to a numeric quantity.
      Parameters:
      info - input quantity metadata
      Returns:
      converter which can convert info quantities to a numeric form, or null if we don't know how to do it