ListMappingConverters

Namespace for containing various conversion utilities dealing with List mapping

Functions

Link copied to clipboard
fun <F, F2, T> ConvertsFrom<List<F>, T>.mapConvertsFrom(elementConverter: ConvertsFrom<F2, F>): ConvertsFrom<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.)

Link copied to clipboard
fun <F, T, T2> ConvertsTo<F, List<T>>.mapConvertsTo(elementConverter: ConvertsTo<T, T2>): ConvertsTo<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.)

Link copied to clipboard
fun <F, T> of(elementConverter: Converter<F, T>): Converter<List<F>, List<T>>

Creates a two-way converter for transforming between a List with elements of type F and a List with elements of type T

fun <F, T> of(elementConverter: ConvertsFrom<F, T>): ConvertsFrom<List<F>, List<T>>

Creates a one-way converter for transforming List with elements of type T to List with elements of type F

fun <F, T> of(elementConverter: ConvertsTo<F, T>): ConvertsTo<List<F>, List<T>>

Creates a one-way converter for transforming List with elements of type F to List with elements of type T