Module MaterialFX
Class EnumStringConverter<E extends Enum<E>>
java.lang.Object
javafx.util.StringConverter<E>
io.github.palexdev.materialfx.utils.EnumStringConverter<E>
Implementation of
StringConverter to work with a generic Enum.
For this to work, it's necessary to specify the enumerator class, see Enum.valueOf(Class, String).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromString(String string) UsesEnumUtils.valueOfIgnoreCase(Class, String)to convert the given String to an enumeration.Calls toString() on the given enumeration.
-
Constructor Details
-
EnumStringConverter
-
-
Method Details
-
toString
Calls toString() on the given enumeration.- Specified by:
toStringin classStringConverter<E extends Enum<E>>
-
fromString
UsesEnumUtils.valueOfIgnoreCase(Class, String)to convert the given String to an enumeration.- Specified by:
fromStringin classStringConverter<E extends Enum<E>>
-