Interface PropertyConverter<T>

Type Parameters:
T - the (minimum) type of the target value
All Known Implementing Classes:
BooleanConverter, CharacterConverter, DateConverter, DefaultEntityConverter, EnumConverter, FormatConverter, MapConverter, NumberConverter, UniquePropertyEntityConverter

public interface PropertyConverter<T>
Used to convert a string from an import file to a Java object.
  • Method Summary

    Modifier and Type
    Method
    Description
    convert(Class<? extends T> targetType, String value)
    Converts a value from import file to Java.
    static <T> PropertyConverter<T>
    of(Function<String,T> converter)
    Converts a function to a PropertyConverter.
  • Method Details

    • of

      static <T> PropertyConverter<T> of(Function<String,T> converter)
      Converts a function to a PropertyConverter.
      Parameters:
      converter - the converter that needs no information of the target type
      Returns:
      the given converter wrapped as PropertyConverter
    • convert

      T convert(Class<? extends T> targetType, String value)
      Converts a value from import file to Java.
      Parameters:
      targetType - the type of the target property
      value - the value in the import file
      Returns:
      the value in Java