Interface TypeConverter<S,​T>

  • Type Parameters:
    S - The source type.
    T - The target type.
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface TypeConverter<S,​T>
    Interface for type conversion.
    Author:
    Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com)
    • Method Detail

      • convert

        T convert​(S source)
           throws TypeConversionException
        Convert a value from a source type to a target type.
        Parameters:
        source - the input value to convert
        Returns:
        The converted value
        Throws:
        TypeConversionException - if an error occurs during type conversion