Top Description Constructors Methods
javafx.util

public abstract Class StringConverter<T>

extends Object
Class Inheritance
Known Direct Subclasses
javafx.util.converter.BigDecimalStringConverter, javafx.util.converter.BigIntegerStringConverter, javafx.util.converter.BooleanStringConverter, javafx.util.converter.ByteStringConverter, javafx.util.converter.CharacterStringConverter, javafx.util.converter.DateTimeStringConverter, javafx.util.converter.DefaultStringConverter, javafx.util.converter.DoubleStringConverter, javafx.util.converter.FloatStringConverter, javafx.util.converter.FormatStringConverter, javafx.util.converter.IntegerStringConverter, javafx.util.converter.LocalDateStringConverter, javafx.util.converter.LocalDateTimeStringConverter, javafx.util.converter.LocalDateTimeStringConverter.LdtConverter, javafx.util.converter.LocalTimeStringConverter, javafx.util.converter.LongStringConverter, javafx.util.converter.NumberStringConverter, javafx.util.converter.ShortStringConverter
Type Parameters
<T>
the type of the object being converted

Converter defines conversion behavior between strings and objects. The type of objects and formats of strings are defined by the subclasses of Converter.
Since
JavaFX 2.0

Constructor Summary

AccessConstructor and Description
public
StringConverter()

Creates a default StringConverter.

Method Summary

Modifier and TypeMethod and Description
public abstract T

Returns:

an object representation of the string passed in.
fromString
(String
the String to convert
string
)

Converts the string provided into an object defined by the specific converter.

public abstract String

Returns:

a string representation of the object passed in
toString
(T
the object of type T to convert
object
)

Converts the object provided into its string form.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

StringConverterback to summary
public StringConverter()

Creates a default StringConverter.

Method Detail

fromStringback to summary
public abstract T fromString(String string)

Converts the string provided into an object defined by the specific converter. Format of the string and type of the resulting object is defined by the specific converter.

Parameters
string:String

the String to convert

Returns:T

an object representation of the string passed in.

toStringback to summary
public abstract String toString(T object)

Converts the object provided into its string form. Format of the returned string is defined by the specific converter.

Parameters
object:T

the object of type T to convert

Returns:String

a string representation of the object passed in