Class ColumnConverter


  • public abstract class ColumnConverter
    extends java.lang.Object
    Performs unit conversions on data values based on a given ValueInfo.
    Since:
    17 Sep 2004
    Author:
    Mark Taylor (Starlink)
    • Constructor Summary

      Constructors 
      Constructor Description
      ColumnConverter()  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract java.lang.Object convertValue​(java.lang.Object value)
      Converts a value from its raw value to the value required for a particular purpose.
      static ColumnConverter[] getConverters​(uk.ac.starlink.table.ValueInfo info)
      Returns a set of converters appropriate for a given ValueInfo.
      abstract java.lang.String toString()
      Provides a user-understandable description of what this converter does.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ColumnConverter

        public ColumnConverter()
    • Method Detail

      • convertValue

        public abstract java.lang.Object convertValue​(java.lang.Object value)
        Converts a value from its raw value to the value required for a particular purpose.
        Parameters:
        value - raw value
        Returns:
        converted value
      • toString

        public abstract java.lang.String toString()
        Provides a user-understandable description of what this converter does. Must be enough to distinguish it from distinct converters which might do the same sort of thing.
        Overrides:
        toString in class java.lang.Object
      • getConverters

        public static ColumnConverter[] getConverters​(uk.ac.starlink.table.ValueInfo info)
        Returns a set of converters appropriate for a given ValueInfo. If only one converter is returned, it's a unit converter (equivalent to a no-op).
        Parameters:
        info - object describing the data which is required
        Returns:
        a set of alternative converters which could be used to modify the values in a given column