Skip to content

Commit

Permalink
Update readme with a list of of what type converters support
Browse files Browse the repository at this point in the history
  • Loading branch information
tenhobi committed Oct 30, 2023
1 parent d51f294 commit 246db16
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/auto_mappr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,25 @@ static Value<Object> objectToValueObject2(Object source) {
}
```

To make it more clear, here is a list of type converters
with an input -> source sublist of what the converter support.

- `TypeConverter<Object, Object>` ... aka `Object converter(Object) => ...`
- `Object` -> `Object`
- `Object` -> `Object?`
- `Object?` -> `Object?`, when source IS NOT null
- `TypeConverter<Object, Object?>` ... aka `Object? converter(Object) => ...`
- `Object` -> `Object?`
- `Object?` -> `Object?` when source IS NOT null
- `TypeConverter<Object?, Object>` ... aka `Object converter(Object?) => ...`
- `Object` -> `Object`
- `Object?` -> `Object`
- `Object` -> `Object?`
- `Object?` -> `Object?`
- `TypeConverter<Object?, Object?>` ... aka `Object? converter(Object?) => ...`
- `Object` -> `Object?`
- `Object?` -> `Object?`

### Reverse mapping

When you want to create a bidirectional mapping (e.g. normal: source to target and reversed: target to source),
Expand Down

0 comments on commit 246db16

Please sign in to comment.