Interface Converter<S,​T>

Type Parameters:
S - Source type
T - Destination type
All Known Implementing Classes:
BlankToNullConverter, ConverterAdapter, DateToStringConverter, StringToSqlDateConverter, StringToTimestampConverter, ZeroToNullConverter

public interface Converter<S,​T>
Converts instances of S to T.
Author:
Eric Nielsen
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canConvert​(Class sourceClass, Class destinationClass)
    Returns true if this converter can convert instances of sourceClass to destinationClass.
    convert​(S source)
    Converts instance of S to T.
  • Method Details

    • canConvert

      boolean canConvert(Class sourceClass, Class destinationClass)
      Returns true if this converter can convert instances of sourceClass to destinationClass.
      Parameters:
      sourceClass - source Class
      destinationClass - destination Class
      Returns:
      true if this converter can convert instances of sourceClass to destinationClass, false otherwise
    • convert

      T convert(S source)
      Converts instance of S to T.
      Parameters:
      source - instance of S
      Returns:
      instance of S converted to type T