Class QVCEnum<T extends Enum<T>>
java.lang.Object
com.io7m.quarrel.core.converters.QVCEnum<T>
- Type Parameters:
T- The base enum type
- All Implemented Interfaces:
QValueConverterType<T>
An enum converter.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertFromString(String text) Convert the given string to a value of typeT.convertToString(T value) Convert a value ofTto a string.syntax()
-
Constructor Details
-
QVCEnum
-
-
Method Details
-
convertFromString
Description copied from interface:QValueConverterTypeConvert the given string to a value of typeT.- Specified by:
convertFromStringin interfaceQValueConverterType<T extends Enum<T>>- Parameters:
text- The input string- Returns:
- A value of
T - Throws:
QException- On errors
-
convertToString
Description copied from interface:QValueConverterTypeConvert a value ofTto a string.- Specified by:
convertToStringin interfaceQValueConverterType<T extends Enum<T>>- Parameters:
value- The value- Returns:
- A string
-
exampleValue
- Specified by:
exampleValuein interfaceQValueConverterType<T extends Enum<T>>- Returns:
- An example value used for documentation
-
syntax
-
convertedClass
- Specified by:
convertedClassin interfaceQValueConverterType<T extends Enum<T>>- Returns:
- The type that will be converted
-