Interface TypeConverter

All Known Implementing Classes:
PropertyTypeConverter
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
Implementations of this interface define a certain type conversation. Conversation can happen from any kind of Comparable type to another.

Implementations of TypeConverter need to be fully thread-safe and must have no internal state as they are expected to be used by multiple threads and with shared instances.

  • Method Details

    • convert

      Comparable convert​(Comparable value)
      Compares a Comparable typed value to another one. Since TypeConverters are not statically typed itself the developer needs to take care of correct usage of input and output types.
      Parameters:
      value - the value to be converted
      Returns:
      the converted value