mapFrom

fun <F, F2, T> Converter<List<F>, T>.mapFrom(elementConverter: Converter<F2, F>): Converter<List<F2>, T>

Chains this list converter with an element converter, yielding a new converter which performs a two-stage mapping conversion. (Note that these two "stages" are conceptual. Each of these stages may consist of multiple logical steps in their actual implementation.)

Parameters

F

The source element type of this converter and the target type of the given elementConverter

F2

The source type of the given elementConverter

T

The target type of this converter

elementConverter

The element converter to chain together with this list converter. Note that the target type of the given elementConverter must be the same as the source element type of this converter.


fun <FK, FV, FK2, FV2, T> Converter<Map<FK, FV>, T>.mapFrom(entryConverter: Converter<Pair<FK2, FV2>, Pair<FK, FV>>): Converter<Map<FK2, FV2>, T>

Chains this map converter with an entry converter, yielding a new converter which performs a two-stage mapping conversion. (Note that these two "stages" are conceptual. Each of these stages may consist of multiple logical steps in their actual implementation.)

Parameters

FK

The type of keys being converted to

FV

The type of values being converted to

FK2

The type of keys being converted from

FV2

The type of values being converted from

T

The target type of this converter

entryConverter

The entry converter to chain together with this map converter. Note that the target types of the given entryConverter must be the same as the source types of this converter.


fun <FK, FV, FK2, FV2, T> Converter<Map<FK, FV>, T>.mapFrom(keyConverter: Converter<FK2, FK>, valueConverter: Converter<FV2, FV>): Converter<Map<FK2, FV2>, T>

Chains this map converter with a key converter and a value converter, yielding a new converter which performs a two-stage mapping conversion. (Note that these two "stages" are conceptual. Each of these stages may consist of multiple logical steps in their actual implementation.)

Parameters

FK

The type of keys being converted to

FV

The type of values being converted to

FK2

The type of keys being converted from

FV2

The type of values being converted from

T

The target type of this converter

keyConverter

The key converter to chain together with this map converter. Note that the target key type of the given keyConverter must be the same as the source key type of this converter.

valueConverter

The value converter to chain together with this map converter. Note that the target value type of the given valueConverter must be the same as the source value type of this converter.


fun <F, F2, T> Converter<Set<F>, T>.mapFrom(elementConverter: Converter<F2, F>): Converter<Set<F2>, T>

Chains this set converter with an element converter, yielding a new converter which performs a two-stage mapping conversion. (Note that these two "stages" are conceptual. Each of these stages may consist of multiple logical steps in their actual implementation.)

Parameters

F

The source element type of this converter and the target type of the given elementConverter

F2

The source type of the given elementConverter

T

The target type of this converter

elementConverter

The element converter to chain together with this set converter. Note that the target type of the given elementConverter must be the same as the source element type of this converter.