Class DoubleStringConverter

java.lang.Object
javafx.util.StringConverter<Double>
javafx.util.converter.DoubleStringConverter

public class DoubleStringConverter extends StringConverter<Double>
A StringConverter implementation for Double (and double) values. Formatting is done by Double.toString() for non-null values, and parsing with Double.valueOf(String) for non-null non-empty strings.
Since:
JavaFX 2.1
  • Constructor Details

    • DoubleStringConverter

      public DoubleStringConverter()
      Creates a default DoubleStringConverter.
  • Method Details

    • fromString

      public Double fromString(String value)
      Converts a string to an object. The parsing mechanism is defined by the specific converter. null and empty string are converted to null.
      Parameters:
      value - the String to convert
      Returns:
      an object of type T created from the string passed in
    • toString

      public String toString(Double value)
      Converts an object to a string form. The format of the returned string is defined by the specific converter. null is converted to an empty string, otherwise the type's toString is used.
      Parameters:
      value - the object of type T to convert
      Returns:
      a string representation of the object passed in