Class EnumConverter

java.lang.Object
org.fastnate.data.properties.EnumConverter
All Implemented Interfaces:
PropertyConverter<Enum<?>>

public class EnumConverter extends Object implements PropertyConverter<Enum<?>>
Converts a string in an import file to an Enum value.
Author:
Tobias Liefke
  • Constructor Details

    • EnumConverter

      public EnumConverter()
  • Method Details

    • convert

      public Enum<?> convert(Class<? extends Enum<?>> targetType, String value)
      Description copied from interface: PropertyConverter
      Converts a value from import file to Java.
      Specified by:
      convert in interface PropertyConverter<Enum<?>>
      Parameters:
      targetType - the type of the target property
      value - the value in the import file
      Returns:
      the value in Java