Class EnumConverter<E extends Enum<E>>
- Type Parameters:
-
E- the enum type
public final class EnumConverter<E extends Enum<E>> extends StyleConverter<String,E>
Converter to convert a string representation of an
Enum to an Enum.- Since:
- 9
Nested Class Summary
Nested classes/interfaces declared in class javafx.css.StyleConverter
StyleConverter.StringStore
Constructor Summary
| Constructor | Description |
|---|---|
EnumConverter |
Creates an EnumConvertor object. |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
static StyleConverter |
getInstance |
Gets an EnumConverter instance for a given enum name. |
static StyleConverter |
readBinary |
Reads binary StyleConverter data from a given DataInputStream. |
Methods declared in class javafx.css.StyleConverter
cacheValue, clearCache, convert, convert, getBooleanConverter, getCachedValue, getColorConverter, getDurationConverter, getEffectConverter, getEnumConverter, getFontConverter, getInsetsConverter, getPaintConverter, getSizeConverter, getStringConverter, getUrlConverter, writeBinary
Constructor Details
EnumConverter
public EnumConverter(Class<E> enumClass)
Creates an
EnumConvertor object.- Parameters:
-
enumClass- enum class
Method Details
readBinary
public static StyleConverter<?,?> readBinary(DataInputStream is, String[] strings) throws IOException
Reads binary
StyleConverter data from a given DataInputStream.- Parameters:
-
is-DataInputStreamto readStyleConverterdata from -
strings- string array containing StyleConverter details - Returns:
- a
StyleConverterfrom read binary data - Throws:
-
IOException- if reading fromDataInputStreamfails
getInstance
public static StyleConverter<?,?> getInstance(String ename)
Gets an
EnumConverter instance for a given enum name.- Parameters:
-
ename- enum name - Returns:
- an
EnumConverterinstance for a given enum name.
© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.