- java.lang.Object
-
- com.remondis.remap.SetBuilder<S,D,RD>
-
- Type Parameters:
S- The source type.D- The destination type.RD- The destination field type.
public class SetBuilder<S,D,RD> extends Object
Builds a replace operation.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MappingConfiguration<S,D>with(Function<S,RD> valueSupplier)Sets a value to the specified destination field supplied by a custom value function.MappingConfiguration<S,D>with(Supplier<RD> valueSupplier)Sets a value to the specified destination field supplied by a custom value supplier.MappingConfiguration<S,D>with(RD value)Sets the specified value to the specified destination field.
-
-
-
Method Detail
-
with
public MappingConfiguration<S,D> with(Function<S,RD> valueSupplier)
Sets a value to the specified destination field supplied by a custom value function. The specified function will be applied to the source object reference. Note: It is not necessary to implement a null-safe function. The specified function will never be called with anullargument.- Parameters:
valueSupplier- The value supplier that requires a reference to the whole source object.- Returns:
- Returns the
MappingConfigurationfor further mapping configuration.
-
with
public MappingConfiguration<S,D> with(Supplier<RD> valueSupplier)
Sets a value to the specified destination field supplied by a custom value supplier.- Parameters:
valueSupplier- The value supplier that requires a reference to the whole source object.- Returns:
- Returns the
MappingConfigurationfor further mapping configuration.
-
with
public MappingConfiguration<S,D> with(RD value)
Sets the specified value to the specified destination field.- Parameters:
value- The value to set.- Returns:
- Returns the
MappingConfigurationfor further mapping configuration.
-
-