# 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>`

public final class QVCEnum<T extends Enum<T>> extends Object implements QValueConverterType<T>
An enum converter.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `QVCEnum(Class<T> inEnumClass)`
  An enum converter.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Class<T>`
  `convertedClass()`
  `T`
  `convertFromString(String text)`
  Convert the given string to a value of type `T`.
  `String`
  `convertToString(T value)`
  Convert a value of `T` to a string.
  `T`
  `exampleValue()`
  `String`
  `syntax()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### QVCEnum

    public QVCEnum(Class<T> inEnumClass)
    An enum converter.
    Parameters:
      `inEnumClass` - The base enum class

- ## Method Details

  - ### convertFromString

    public T convertFromString(String text) throws QException
    Description copied from interface: `QValueConverterType`
    Convert the given string to a value of type `T`.
    Specified by:
      `convertFromString` in interface `QValueConverterType<T extends Enum<T>>`
    Parameters:
      `text` - The input string
    Returns:
      A value of `T`
    Throws:
      `QException` - On errors

  - ### convertToString

    public String convertToString(T value)
    Description copied from interface: `QValueConverterType`
    Convert a value of `T` to a string.
    Specified by:
      `convertToString` in interface `QValueConverterType<T extends Enum<T>>`
    Parameters:
      `value` - The value
    Returns:
      A string

  - ### exampleValue

    public T exampleValue()
    Specified by:
      `exampleValue` in interface `QValueConverterType<T extends Enum<T>>`
    Returns:
      An example value used for documentation

  - ### syntax

    public String syntax()
    Specified by:
      `syntax` in interface `QValueConverterType<T extends Enum<T>>`
    Returns:
      A description of the syntax for valid values of `T`

  - ### convertedClass

    public Class<T> convertedClass()
    Specified by:
      `convertedClass` in interface `QValueConverterType<T extends Enum<T>>`
    Returns:
      The type that will be converted