Class EnumConverter<T extends Enum<T>>

  • All Implemented Interfaces:
    Converter<T>

    public class EnumConverter<T extends Enum<T>>
    extends Object
    implements Converter<T>
    Class for converting enumeration types.
    Version:
    $Revision$ $Date$
    • Constructor Detail

      • EnumConverter

        public EnumConverter​(Class<T> type)
    • Method Detail

      • getValueType

        public Class<T> getValueType()
        Description copied from interface: Converter
        Gets the value type.
        Specified by:
        getValueType in interface Converter<T extends Enum<T>>
        Returns:
        The value type.
      • format

        public String format​(T value)
        Description copied from interface: Converter
        Converts a value of the type returned by Converter.getValueType() to its plain text representation.
        Specified by:
        format in interface Converter<T extends Enum<T>>
        Parameters:
        value - The value to be converted to text.
        Returns:
        The textual representation of the value.