Class TypeMapping<S,​D>

  • Type Parameters:
    S - The source type
    D - The destination type.

    public final class TypeMapping<S,​D>
    extends Object
    A type mapping wraps a function that maps one type into another. This mapping can be used to define a global type mapping on a MappingConfiguration. Apart from Java Bean mappers, that support a field by field mapping a TypeMapping can be useful if a type conversion occurs very often in a mapping. A TypeMapping may reduce the number of replace-operations needed to define a mapping.
    • Method Detail

      • from

        public static <S> TypeMapping.TypeMappingBuilder<S> from​(Class<S> source)
        Specifies the source data type to map from.
        Parameters:
        source - the data source type.
        Returns:
        Returns a Types object for further mapping configuration.
      • map

        public D map​(S source,
                     D destination)
      • map

        public D map​(S source)
      • getProjection

        public com.remondis.remap.Projection<S,​D> getProjection()