Interface ITypeConverter<SRC,DST>

Type Parameters:
SRC - source type
DST - destination type
All Superinterfaces:
Function<SRC,DST>
All Known Subinterfaces:
ITypeConverterRule<SRC,DST>
All Known Implementing Classes:
AbstractTypeConverterRule, TypeConverterRuleAnySourceFixedDestination, TypeConverterRuleAssignableSourceFixedDestination, TypeConverterRuleFixedSourceAnyDestination, TypeConverterRuleFixedSourceAssignableDestination
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 ITypeConverter<SRC,DST> extends Function<SRC,DST>
Special interface that is used to convert between values of different types.
Author:
Philip Helger
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(SRC aSource)
    Convert the passed source object to the destination type.

    Methods inherited from interface java.util.function.Function

    andThen, compose
  • Method Details

    • apply

      @Nullable DST apply(@Nonnull SRC aSource)
      Convert the passed source object to the destination type.
      Specified by:
      apply in interface Function<SRC,DST>
      Parameters:
      aSource - The source object to be converted. Cannot be null because the type converter already filters null values!
      Returns:
      The converted value. May be null.