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 Stringformat(T value)Converts a value of the type returned byConverter.getValueType()to its plain text representation.Class<T>getValueType()Gets the value type.Tparse(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:ConverterGets the value type.- Specified by:
getValueTypein interfaceConverter<T extends Enum<T>>- Returns:
- The value type.
-
parse
public T parse(String text) throws ConversionException
Description copied from interface:ConverterConverts 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:ConverterConverts a value of the type returned byConverter.getValueType()to its plain text representation.
-
-