- java.lang.Object
-
- com.remondis.remap.TypeMapping<S,D>
-
- Type Parameters:
S- The source typeD- 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 aMappingConfiguration. Apart from Java Bean mappers, that support a field by field mapping aTypeMappingcan be useful if a type conversion occurs very often in a mapping. ATypeMappingmay reduce the number of replace-operations needed to define a mapping.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTypeMapping.TypeMappingBuilder<S>static classTypeMapping.TypeMappingFunctionBuilder<S,D>
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <S> TypeMapping.TypeMappingBuilder<S>from(Class<S> source)Specifies the source data type to map from.com.remondis.remap.Projection<S,D>getProjection()Dmap(S source)Dmap(S source, D destination)
-
-
-
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
Typesobject for further mapping configuration.
-
-