DefaultStringConverter (JavaFX 28)
Description: declaration: module: javafx.base, package: javafx.util.converter, class: DefaultStringConverter

# Class DefaultStringConverter

java.lang.Object
javafx.util.StringConverter<String>
javafx.util.converter.DefaultStringConverter

public class DefaultStringConverter extends StringConverter<String>
A `StringConverter` implementation for `String` values.

Since:
  JavaFX 2.1

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DefaultStringConverter()`
  Creates a default `DefaultStringConverter`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `fromString(String string)`
  Returns `string`.
  `String`
  `toString(String string)`
  Returns `string`, or empty string if `null`.

  ### Methods declared in class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DefaultStringConverter

    public DefaultStringConverter()
    Creates a default `DefaultStringConverter`.

- ## Method Details

  - ### toString

    public String toString(String string)
    Returns `string`, or empty string if `null`.
    Specified by:
      `toString` in class `StringConverter<String>`
    Parameters:
      `string` - the object of type `T` to convert
    Returns:
      `string`, or empty string if `null`

  - ### fromString

    public String fromString(String string)
    Returns `string`.
    Specified by:
      `fromString` in class `StringConverter<String>`
    Parameters:
      `string` - the `String` to convert
    Returns:
      `string`