mapTo

fun <F, T, T2> Converter<F, List<T>>.mapTo(elementConverter: Converter<T, T2>): Converter<F, List<T2>>

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 type of this converter

T

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

T2

The target type of the given elementConverter

elementConverter

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


fun <F, TK, TV, TK2, TV2> Converter<F, Map<TK, TV>>.mapTo(entryConverter: Converter<Pair<TK, TV>, Pair<TK2, TV2>>): Converter<F, Map<TK2, TV2>>

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

F

The source type of this converter

TK

The type of keys being converted from

TV

The type of values being converted from

TK2

The type of keys being converted to

TV2

The type of values being converted to

entryConverter

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


fun <F, TK, TV, TK2, TV2> Converter<F, Map<TK, TV>>.mapTo(keyConverter: Converter<TK, TK2>, valueConverter: Converter<TV, TV2>): Converter<F, Map<TK2, TV2>>

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

F

The source type of this converter

TK

The type of keys being converted from

TV

The type of values being converted from

TK2

The type of keys being converted to

TV2

The type of values being converted to

keyConverter

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

valueConverter

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


fun <F, T, T2> Converter<F, Set<T>>.mapTo(elementConverter: Converter<T, T2>): Converter<F, Set<T2>>

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 type of this converter

T

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

T2

The target type of the given elementConverter

elementConverter

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