Package com.bc.ceres.binding.converters
Class EnumConverter<T extends Enum<T>>
- java.lang.Object
-
- com.bc.ceres.binding.converters.EnumConverter<T>
-
-
Constructor Summary
Constructors Constructor Description EnumConverter(Class<T> type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
format(T value)
Converts a value of the type returned byConverter.getValueType()
to its plain text representation.Class<T>
getValueType()
Gets the value type.T
parse(String text)
Converts a value from its plain text representation to a Java object instance of the type returned byConverter.getValueType()
.
-
-
-
Method Detail
-
getValueType
public Class<T> getValueType()
Description copied from interface:Converter
Gets the value type.- Specified by:
getValueType
in interfaceConverter<T extends Enum<T>>
- Returns:
- The value type.
-
parse
public T parse(String text) throws ConversionException
Description copied from interface:Converter
Converts a value from its plain text representation to a Java object instance of the type returned byConverter.getValueType()
.
-
format
public String format(T value)
Description copied from interface:Converter
Converts a value of the type returned byConverter.getValueType()
to its plain text representation.
-
-