Class ValueConverter

    • Constructor Detail

      • ValueConverter

        public ValueConverter​(java.lang.String name)
        Constructor.
        Parameters:
        name - format name (suitable for display in a combo box)
    • Method Detail

      • convertValue

        public abstract double convertValue​(java.lang.String sval)
        Converts a string value to a numeric for this format
        Parameters:
        sval - string value
        Returns:
        numeric equivalent of sval
        Throws:
        java.lang.IllegalArgumentException - if sval doesn't make sense to this converter
      • unconvertValue

        public abstract java.lang.String unconvertValue​(double dval)
        Converts a numeric value to a string value for this format.
        Parameters:
        dval - numeric value
        Returns:
        string representation of dval
      • getName

        public java.lang.String getName()
        Returns format name.
        Returns:
        name
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object